<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- | Extract docs from the renamer output so they can be serialized.</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE LambdaCase #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE ViewPatterns #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.HsToCore.Docs</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html"><span class="hs-identifier">GHC.Data.Bag</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html"><span class="hs-identifier">GHC.Hs.Binds</span></a></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html"><span class="hs-identifier">GHC.Hs.Doc</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html"><span class="hs-identifier">GHC.Hs.Decls</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html"><span class="hs-identifier">GHC.Hs.Extension</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html"><span class="hs-identifier">GHC.Hs.Type</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.Utils.html"><span class="hs-identifier">GHC.Hs.Utils</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html"><span class="hs-identifier">GHC.Types.Name.Set</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html"><span class="hs-identifier">GHC.Tc.Types</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bifunctor.html#"><span class="hs-identifier">Data.Bifunctor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Bifunctor.html#first"><span class="hs-identifier">first</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier">Map</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">M</span></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Semigroup.html#"><span class="hs-identifier">Data.Semigroup</span></a></span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-comment">-- | Extract docs from renamer output.</span><span>
</span><span id="line-33"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#extractDocs"><span class="hs-identifier hs-type">extractDocs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span>
</span><span id="line-34"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-type">DeclDocMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-type">ArgDocMap</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-35"></span><span>            </span><span class="hs-comment">-- ^</span><span>
</span><span id="line-36"></span><span>            </span><span class="hs-comment">-- 1. Module header</span><span>
</span><span id="line-37"></span><span>            </span><span class="hs-comment">-- 2. Docs on top level declarations</span><span>
</span><span id="line-38"></span><span>            </span><span class="hs-comment">-- 3. Docs on arguments</span><span>
</span><span id="line-39"></span><span id="extractDocs"><span class="annot"><span class="annottext">extractDocs :: TcGblEnv -&gt; (Maybe HsDocString, DeclDocMap, ArgDocMap)
</span><a href="GHC.HsToCore.Docs.html#extractDocs"><span class="hs-identifier hs-var hs-var">extractDocs</span></a></span></span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">tcg_semantic_mod :: TcGblEnv -&gt; Module
</span><a href="GHC.Tc.Types.html#tcg_semantic_mod"><span class="hs-identifier hs-var">tcg_semantic_mod</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952485"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680952485"><span class="hs-identifier hs-var">mod</span></a></span></span><span>
</span><span id="line-40"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">tcg_rn_decls :: TcGblEnv -&gt; Maybe (HsGroup (GhcPass 'Renamed))
</span><a href="GHC.Tc.Types.html#tcg_rn_decls"><span class="hs-identifier hs-var">tcg_rn_decls</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952483"><span class="annot"><span class="annottext">Maybe (HsGroup (GhcPass 'Renamed))
</span><a href="#local-6989586621680952483"><span class="hs-identifier hs-var">mb_rn_decls</span></a></span></span><span>
</span><span id="line-41"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">tcg_insts :: TcGblEnv -&gt; [ClsInst]
</span><a href="GHC.Tc.Types.html#tcg_insts"><span class="hs-identifier hs-var">tcg_insts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952481"><span class="annot"><span class="annottext">[ClsInst]
</span><a href="#local-6989586621680952481"><span class="hs-identifier hs-var">insts</span></a></span></span><span>
</span><span id="line-42"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">tcg_fam_insts :: TcGblEnv -&gt; [FamInst]
</span><a href="GHC.Tc.Types.html#tcg_fam_insts"><span class="hs-identifier hs-var">tcg_fam_insts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952479"><span class="annot"><span class="annottext">[FamInst]
</span><a href="#local-6989586621680952479"><span class="hs-identifier hs-var">fam_insts</span></a></span></span><span>
</span><span id="line-43"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">tcg_doc_hdr :: TcGblEnv -&gt; Maybe LHsDocString
</span><a href="GHC.Tc.Types.html#tcg_doc_hdr"><span class="hs-identifier hs-var">tcg_doc_hdr</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952477"><span class="annot"><span class="annottext">Maybe LHsDocString
</span><a href="#local-6989586621680952477"><span class="hs-identifier hs-var">mb_doc_hdr</span></a></span></span><span>
</span><span id="line-44"></span><span>                     </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsDocString -&gt; HsDocString
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(LHsDocString -&gt; HsDocString)
-&gt; Maybe LHsDocString -&gt; Maybe HsDocString
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe LHsDocString
</span><a href="#local-6989586621680952477"><span class="hs-identifier hs-var">mb_doc_hdr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map Name HsDocString -&gt; DeclDocMap
</span><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-var">DeclDocMap</span></a></span><span> </span><span class="annot"><span class="annottext">Map Name HsDocString
</span><a href="#local-6989586621680952473"><span class="hs-identifier hs-var">doc_map</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map Name (Map Int HsDocString) -&gt; ArgDocMap
</span><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-var">ArgDocMap</span></a></span><span> </span><span class="annot"><span class="annottext">Map Name (Map Int HsDocString)
</span><a href="#local-6989586621680952471"><span class="hs-identifier hs-var">arg_map</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680952473"><span class="annot"><span class="annottext">Map Name HsDocString
</span><a href="#local-6989586621680952473"><span class="hs-identifier hs-var">doc_map</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952471"><span class="annot"><span class="annottext">Map Name (Map Int HsDocString)
</span><a href="#local-6989586621680952471"><span class="hs-identifier hs-var">arg_map</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Map Name HsDocString, Map Name (Map Int HsDocString))
-&gt; ([(LHsDecl (GhcPass 'Renamed), [HsDocString])]
    -&gt; (Map Name HsDocString, Map Name (Map Int HsDocString)))
-&gt; Maybe [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
-&gt; (Map Name HsDocString, Map Name (Map Int HsDocString))
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map Name HsDocString
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map Name (Map Int HsDocString)
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span>                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Name]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
-&gt; (Map Name HsDocString, Map Name (Map Int HsDocString))
</span><a href="GHC.HsToCore.Docs.html#mkMaps"><span class="hs-identifier hs-var">mkMaps</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680952467"><span class="hs-identifier hs-var">local_insts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span>                               </span><span class="annot"><span class="annottext">Maybe [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
</span><a href="#local-6989586621680952466"><span class="hs-identifier hs-var">mb_decls_with_docs</span></a></span><span>
</span><span id="line-50"></span><span>    </span><span id="local-6989586621680952466"><span class="annot"><span class="annottext">mb_decls_with_docs :: Maybe [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
</span><a href="#local-6989586621680952466"><span class="hs-identifier hs-var hs-var">mb_decls_with_docs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
</span><a href="GHC.HsToCore.Docs.html#topDecls"><span class="hs-identifier hs-var">topDecls</span></a></span><span> </span><span class="annot"><span class="annottext">(HsGroup (GhcPass 'Renamed)
 -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; Maybe (HsGroup (GhcPass 'Renamed))
-&gt; Maybe [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (HsGroup (GhcPass 'Renamed))
</span><a href="#local-6989586621680952483"><span class="hs-identifier hs-var">mb_rn_decls</span></a></span><span>
</span><span id="line-51"></span><span>    </span><span id="local-6989586621680952467"><span class="annot"><span class="annottext">local_insts :: [Name]
</span><a href="#local-6989586621680952467"><span class="hs-identifier hs-var hs-var">local_insts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Bool) -&gt; [Name] -&gt; [Name]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier hs-var">nameIsLocalOrFrom</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680952485"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span>                         </span><span class="annot"><span class="annottext">([Name] -&gt; [Name]) -&gt; [Name] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(ClsInst -&gt; Name) -&gt; [ClsInst] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ClsInst -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">[ClsInst]
</span><a href="#local-6989586621680952481"><span class="hs-identifier hs-var">insts</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(FamInst -&gt; Name) -&gt; [FamInst] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FamInst -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">[FamInst]
</span><a href="#local-6989586621680952479"><span class="hs-identifier hs-var">fam_insts</span></a></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-comment">-- | Create decl and arg doc-maps by looping through the declarations.</span><span>
</span><span id="line-55"></span><span class="hs-comment">-- For each declaration, find its names, its subordinates, and its doc strings.</span><span>
</span><span id="line-56"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#mkMaps"><span class="hs-identifier hs-type">mkMaps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-57"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-58"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span id="mkMaps"><span class="annot"><span class="annottext">mkMaps :: [Name]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
-&gt; (Map Name HsDocString, Map Name (Map Int HsDocString))
</span><a href="GHC.HsToCore.Docs.html#mkMaps"><span class="hs-identifier hs-var hs-var">mkMaps</span></a></span></span><span> </span><span id="local-6989586621680952461"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680952461"><span class="hs-identifier hs-var">instances</span></a></span></span><span> </span><span id="local-6989586621680952460"><span class="annot"><span class="annottext">[(LHsDecl (GhcPass 'Renamed), [HsDocString])]
</span><a href="#local-6989586621680952460"><span class="hs-identifier hs-var">decls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-60"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">[[(Name, HsDocString)]] -&gt; Map Name HsDocString
forall a. Ord a =&gt; [[(a, HsDocString)]] -&gt; Map a HsDocString
</span><a href="#local-6989586621680952459"><span class="hs-identifier hs-var">f'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">([(Name, HsDocString)] -&gt; [(Name, HsDocString)])
-&gt; [[(Name, HsDocString)]] -&gt; [[(Name, HsDocString)]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Name, HsDocString) -&gt; Name)
-&gt; [(Name, HsDocString)] -&gt; [(Name, HsDocString)]
forall a. (a -&gt; Name) -&gt; [a] -&gt; [a]
</span><a href="GHC.HsToCore.Docs.html#nubByName"><span class="hs-identifier hs-var">nubByName</span></a></span><span> </span><span class="annot"><span class="annottext">(Name, HsDocString) -&gt; Name
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[[(Name, HsDocString)]]
</span><a href="#local-6989586621680952457"><span class="hs-identifier hs-var">decls'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[[(Name, Map Int HsDocString)]] -&gt; Map Name (Map Int HsDocString)
forall a b. (Ord a, Semigroup b) =&gt; [[(a, b)]] -&gt; Map a b
</span><a href="#local-6989586621680952456"><span class="hs-identifier hs-var">f</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Map Int HsDocString -&gt; Bool)
-&gt; [[(Name, Map Int HsDocString)]]
-&gt; [[(Name, Map Int HsDocString)]]
forall b a. (b -&gt; Bool) -&gt; [[(a, b)]] -&gt; [[(a, b)]]
</span><a href="#local-6989586621680952455"><span class="hs-identifier hs-var">filterMapping</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool)
-&gt; (Map Int HsDocString -&gt; Bool) -&gt; Map Int HsDocString -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Map Int HsDocString -&gt; Bool
forall k a. Map k a -&gt; Bool
</span><a href="../../containers/src/Data.Map.Internal.html#null"><span class="hs-identifier hs-var">M.null</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[[(Name, Map Int HsDocString)]]
</span><a href="#local-6989586621680952451"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-64"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680952457"><span class="annot"><span class="annottext">[[(Name, HsDocString)]]
</span><a href="#local-6989586621680952457"><span class="hs-identifier hs-var">decls'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952451"><span class="annot"><span class="annottext">[[(Name, Map Int HsDocString)]]
</span><a href="#local-6989586621680952451"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[([(Name, HsDocString)], [(Name, Map Int HsDocString)])]
-&gt; ([[(Name, HsDocString)]], [[(Name, Map Int HsDocString)]])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((LHsDecl (GhcPass 'Renamed), [HsDocString])
 -&gt; ([(Name, HsDocString)], [(Name, Map Int HsDocString)]))
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
-&gt; [([(Name, HsDocString)], [(Name, Map Int HsDocString)])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(LHsDecl (GhcPass 'Renamed), [HsDocString])
-&gt; ([(Name, HsDocString)], [(Name, Map Int HsDocString)])
</span><a href="#local-6989586621680952449"><span class="hs-identifier hs-var">mappings</span></a></span><span> </span><span class="annot"><span class="annottext">[(LHsDecl (GhcPass 'Renamed), [HsDocString])]
</span><a href="#local-6989586621680952460"><span class="hs-identifier hs-var">decls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span>    </span><span id="local-6989586621680952780"><span id="local-6989586621680952781"><span class="annot"><a href="#local-6989586621680952456"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621680952781"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952780"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680952781"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680952780"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952781"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952780"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-67"></span><span>    </span><span id="local-6989586621680952456"><span class="annot"><span class="annottext">f :: forall a b. (Ord a, Semigroup b) =&gt; [[(a, b)]] -&gt; Map a b
</span><a href="#local-6989586621680952456"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; b -&gt; b) -&gt; [(a, b)] -&gt; Map a b
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromListWith"><span class="hs-identifier hs-var">M.fromListWith</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; b
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">([(a, b)] -&gt; Map a b)
-&gt; ([[(a, b)]] -&gt; [(a, b)]) -&gt; [[(a, b)]] -&gt; Map a b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[[(a, b)]] -&gt; [(a, b)]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span>    </span><span id="local-6989586621680952785"><span class="annot"><a href="#local-6989586621680952459"><span class="hs-identifier hs-type">f'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621680952785"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680952785"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952785"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span></span><span>
</span><span id="line-70"></span><span>    </span><span id="local-6989586621680952459"><span class="annot"><span class="annottext">f' :: forall a. Ord a =&gt; [[(a, HsDocString)]] -&gt; Map a HsDocString
</span><a href="#local-6989586621680952459"><span class="hs-identifier hs-var hs-var">f'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HsDocString -&gt; HsDocString -&gt; HsDocString)
-&gt; [(a, HsDocString)] -&gt; Map a HsDocString
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromListWith"><span class="hs-identifier hs-var">M.fromListWith</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocString -&gt; HsDocString -&gt; HsDocString
</span><a href="GHC.Hs.Doc.html#appendDocs"><span class="hs-identifier hs-var">appendDocs</span></a></span><span> </span><span class="annot"><span class="annottext">([(a, HsDocString)] -&gt; Map a HsDocString)
-&gt; ([[(a, HsDocString)]] -&gt; [(a, HsDocString)])
-&gt; [[(a, HsDocString)]]
-&gt; Map a HsDocString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[[(a, HsDocString)]] -&gt; [(a, HsDocString)]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span>    </span><span id="local-6989586621680952778"><span id="local-6989586621680952779"><span class="annot"><a href="#local-6989586621680952455"><span class="hs-identifier hs-type">filterMapping</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680952779"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680952778"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680952779"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680952778"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680952779"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">]</span></span></span><span>
</span><span id="line-73"></span><span>    </span><span id="local-6989586621680952455"><span class="annot"><span class="annottext">filterMapping :: forall b a. (b -&gt; Bool) -&gt; [[(a, b)]] -&gt; [[(a, b)]]
</span><a href="#local-6989586621680952455"><span class="hs-identifier hs-var hs-var">filterMapping</span></a></span></span><span> </span><span id="local-6989586621680952437"><span class="annot"><span class="annottext">b -&gt; Bool
</span><a href="#local-6989586621680952437"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([(a, b)] -&gt; [(a, b)]) -&gt; [[(a, b)]] -&gt; [[(a, b)]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((a, b) -&gt; Bool) -&gt; [(a, b)] -&gt; [(a, b)]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b -&gt; Bool
</span><a href="#local-6989586621680952437"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">(b -&gt; Bool) -&gt; ((a, b) -&gt; b) -&gt; (a, b) -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(a, b) -&gt; b
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span>    </span><span class="annot"><a href="#local-6989586621680952449"><span class="hs-identifier hs-type">mappings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-77"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-78"></span><span>                </span><span class="hs-special">)</span><span>
</span><span id="line-79"></span><span>    </span><span id="local-6989586621680952449"><span class="annot"><span class="annottext">mappings :: (LHsDecl (GhcPass 'Renamed), [HsDocString])
-&gt; ([(Name, HsDocString)], [(Name, Map Int HsDocString)])
</span><a href="#local-6989586621680952449"><span class="hs-identifier hs-var hs-var">mappings</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span id="local-6989586621680952434"><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680952434"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680952433"><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952433"><span class="hs-identifier hs-var">decl</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952432"><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952432"><span class="hs-identifier hs-var">docStrs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-80"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Name, HsDocString)]
</span><a href="#local-6989586621680952431"><span class="hs-identifier hs-var">dm</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(Name, Map Int HsDocString)]
</span><a href="#local-6989586621680952430"><span class="hs-identifier hs-var">am</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-81"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-82"></span><span>        </span><span id="local-6989586621680952429"><span class="annot"><span class="annottext">doc :: Maybe HsDocString
</span><a href="#local-6989586621680952429"><span class="hs-identifier hs-var hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HsDocString] -&gt; Maybe HsDocString
</span><a href="GHC.Hs.Doc.html#concatDocs"><span class="hs-identifier hs-var">concatDocs</span></a></span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952432"><span class="hs-identifier hs-var">docStrs</span></a></span><span>
</span><span id="line-83"></span><span>        </span><span id="local-6989586621680952427"><span class="annot"><span class="annottext">args :: Map Int HsDocString
</span><a href="#local-6989586621680952427"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#declTypeDocs"><span class="hs-identifier hs-var">declTypeDocs</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952433"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span>        </span><span class="annot"><a href="#local-6989586621680952425"><span class="hs-identifier hs-type">subs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-86"></span><span>        </span><span id="local-6989586621680952425"><span class="annot"><span class="annottext">subs :: [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952425"><span class="hs-identifier hs-var hs-var">subs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map RealSrcSpan Name
-&gt; HsDecl (GhcPass 'Renamed)
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="GHC.HsToCore.Docs.html#subordinates"><span class="hs-identifier hs-var">subordinates</span></a></span><span> </span><span class="annot"><span class="annottext">Map RealSrcSpan Name
</span><a href="#local-6989586621680952423"><span class="hs-identifier hs-var">instanceMap</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952433"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621680952422"><span class="annot"><span class="annottext">[Maybe HsDocString]
</span><a href="#local-6989586621680952422"><span class="hs-identifier hs-var">subDocs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952421"><span class="annot"><span class="annottext">[Map Int HsDocString]
</span><a href="#local-6989586621680952421"><span class="hs-identifier hs-var">subArgs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-89"></span><span>          </span><span class="annot"><span class="annottext">[(Maybe HsDocString, Map Int HsDocString)]
-&gt; ([Maybe HsDocString], [Map Int HsDocString])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Name, [HsDocString], Map Int HsDocString)
 -&gt; (Maybe HsDocString, Map Int HsDocString))
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
-&gt; [(Maybe HsDocString, Map Int HsDocString)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952420"><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952420"><span class="hs-identifier hs-var">strs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952419"><span class="annot"><span class="annottext">Map Int HsDocString
</span><a href="#local-6989586621680952419"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[HsDocString] -&gt; Maybe HsDocString
</span><a href="GHC.Hs.Doc.html#concatDocs"><span class="hs-identifier hs-var">concatDocs</span></a></span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952420"><span class="hs-identifier hs-var">strs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map Int HsDocString
</span><a href="#local-6989586621680952419"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952425"><span class="hs-identifier hs-var">subs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span>        </span><span id="local-6989586621680952418"><span class="annot"><span class="annottext">ns :: [Name]
</span><a href="#local-6989586621680952418"><span class="hs-identifier hs-var hs-var">ns</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RealSrcSpan -&gt; HsDecl (GhcPass 'Renamed) -&gt; [Name]
</span><a href="#local-6989586621680952417"><span class="hs-identifier hs-var">names</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680952434"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952433"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-92"></span><span>        </span><span id="local-6989586621680952416"><span class="annot"><span class="annottext">subNs :: [Name]
</span><a href="#local-6989586621680952416"><span class="hs-identifier hs-var hs-var">subNs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952415"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680952415"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952415"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map Int HsDocString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952425"><span class="hs-identifier hs-var">subs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-93"></span><span>        </span><span id="local-6989586621680952431"><span class="annot"><span class="annottext">dm :: [(Name, HsDocString)]
</span><a href="#local-6989586621680952431"><span class="hs-identifier hs-var hs-var">dm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952414"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680952413"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680952414"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952414"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680952413"><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680952413"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Maybe HsDocString] -&gt; [(Name, Maybe HsDocString)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680952418"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe HsDocString -&gt; [Maybe HsDocString]
forall a. a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe HsDocString
</span><a href="#local-6989586621680952429"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(Name, Maybe HsDocString)]
-&gt; [(Name, Maybe HsDocString)] -&gt; [(Name, Maybe HsDocString)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Maybe HsDocString] -&gt; [(Name, Maybe HsDocString)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680952416"><span class="hs-identifier hs-var">subNs</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe HsDocString]
</span><a href="#local-6989586621680952422"><span class="hs-identifier hs-var">subDocs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-94"></span><span>        </span><span id="local-6989586621680952430"><span class="annot"><span class="annottext">am :: [(Name, Map Int HsDocString)]
</span><a href="#local-6989586621680952430"><span class="hs-identifier hs-var hs-var">am</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952411"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map Int HsDocString
</span><a href="#local-6989586621680952427"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680952411"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952411"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680952418"><span class="hs-identifier hs-var">ns</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[(Name, Map Int HsDocString)]
-&gt; [(Name, Map Int HsDocString)] -&gt; [(Name, Map Int HsDocString)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Map Int HsDocString] -&gt; [(Name, Map Int HsDocString)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680952416"><span class="hs-identifier hs-var">subNs</span></a></span><span> </span><span class="annot"><span class="annottext">[Map Int HsDocString]
</span><a href="#local-6989586621680952421"><span class="hs-identifier hs-var">subArgs</span></a></span><span>
</span><span id="line-95"></span><span>    </span><span class="annot"><a href="#local-6989586621680952449"><span class="hs-identifier hs-var">mappings</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#UnhelpfulSpan"><span class="hs-identifier hs-type">UnhelpfulSpan</span></a></span><span> </span><span class="annot"><span class="annottext">UnhelpfulSpanReason
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span>    </span><span class="annot"><a href="#local-6989586621680952423"><span class="hs-identifier hs-type">instanceMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-98"></span><span>    </span><span id="local-6989586621680952423"><span class="annot"><span class="annottext">instanceMap :: Map RealSrcSpan Name
</span><a href="#local-6989586621680952423"><span class="hs-identifier hs-var hs-var">instanceMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(RealSrcSpan, Name)] -&gt; Map RealSrcSpan Name
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">M.fromList</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680952408"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952407"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680952407"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952407"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680952461"><span class="hs-identifier hs-var">instances</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span id="local-6989586621680952408"><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680952408"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name -&gt; SrcSpan
forall a. NamedThing a =&gt; a -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#getSrcSpan"><span class="hs-identifier hs-var">getSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952407"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span>    </span><span class="annot"><a href="#local-6989586621680952417"><span class="hs-identifier hs-type">names</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsDecl"><span class="hs-identifier hs-type">HsDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-101"></span><span>    </span><span id="local-6989586621680952417"><span class="annot"><span class="annottext">names :: RealSrcSpan -&gt; HsDecl (GhcPass 'Renamed) -&gt; [Name]
</span><a href="#local-6989586621680952417"><span class="hs-identifier hs-var hs-var">names</span></a></span></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#InstD"><span class="hs-identifier hs-type">InstD</span></a></span><span> </span><span class="annot"><span class="annottext">XInstD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952404"><span class="annot"><span class="annottext">InstDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952404"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Name -&gt; [Name]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Name -&gt; [Name]) -&gt; Maybe Name -&gt; [Name]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; Map RealSrcSpan Name -&gt; Maybe Name
forall a. SrcSpan -&gt; Map RealSrcSpan a -&gt; Maybe a
</span><a href="GHC.Types.SrcLoc.html#lookupSrcSpan"><span class="hs-identifier hs-var">lookupSrcSpan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstDecl (GhcPass 'Renamed) -&gt; SrcSpan
forall (p :: Pass). InstDecl (GhcPass p) -&gt; SrcSpan
</span><a href="GHC.HsToCore.Docs.html#getInstLoc"><span class="hs-identifier hs-var">getInstLoc</span></a></span><span> </span><span class="annot"><span class="annottext">InstDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952404"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Map RealSrcSpan Name
</span><a href="#local-6989586621680952423"><span class="hs-identifier hs-var">instanceMap</span></a></span><span>
</span><span id="line-102"></span><span>    </span><span class="annot"><a href="#local-6989586621680952417"><span class="hs-identifier hs-var">names</span></a></span><span> </span><span id="local-6989586621680952400"><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680952400"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#DerivD"><span class="hs-identifier hs-type">DerivD</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Name -&gt; [Name]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealSrcSpan -&gt; Map RealSrcSpan Name -&gt; Maybe Name
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">M.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680952400"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Map RealSrcSpan Name
</span><a href="#local-6989586621680952423"><span class="hs-identifier hs-var">instanceMap</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- See Note [1].</span><span>
</span><span id="line-103"></span><span>    </span><span class="annot"><a href="#local-6989586621680952417"><span class="hs-identifier hs-var">names</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952397"><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952397"><span class="hs-identifier hs-var">decl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed) -&gt; [IdP (GhcPass 'Renamed)]
forall (p :: Pass).
CollectPass (GhcPass p) =&gt;
HsDecl (GhcPass p) -&gt; [IdP (GhcPass p)]
</span><a href="GHC.HsToCore.Docs.html#getMainDeclBinder"><span class="hs-identifier hs-var">getMainDeclBinder</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952397"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-comment">{-
Note [1]:
---------
We relate ClsInsts to InstDecls and DerivDecls using the SrcSpans buried
inside them. That should work for normal user-written instances (from
looking at GHC sources). We can assume that commented instances are
user-written. This lets us relate Names (from ClsInsts) to comments
(associated with InstDecls and DerivDecls).
-}</span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span id="local-6989586621680952738"><span class="annot"><a href="GHC.HsToCore.Docs.html#getMainDeclBinder"><span class="hs-identifier hs-type">getMainDeclBinder</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Utils.html#CollectPass"><span class="hs-identifier hs-type">CollectPass</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952738"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span>                  </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsDecl"><span class="hs-identifier hs-type">HsDecl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952738"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-117"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Extension.html#IdP"><span class="hs-identifier hs-type">IdP</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952738"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span></span><span>
</span><span id="line-118"></span><span id="getMainDeclBinder"><span class="annot"><span class="annottext">getMainDeclBinder :: forall (p :: Pass).
CollectPass (GhcPass p) =&gt;
HsDecl (GhcPass p) -&gt; [IdP (GhcPass p)]
</span><a href="GHC.HsToCore.Docs.html#getMainDeclBinder"><span class="hs-identifier hs-var hs-var">getMainDeclBinder</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#TyClD"><span class="hs-identifier hs-type">TyClD</span></a></span><span> </span><span class="annot"><span class="annottext">XTyClD (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952392"><span class="annot"><span class="annottext">TyClDecl (GhcPass p)
</span><a href="#local-6989586621680952392"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyClDecl (GhcPass p) -&gt; IdP (GhcPass p)
forall (p :: Pass). TyClDecl (GhcPass p) -&gt; IdP (GhcPass p)
</span><a href="GHC.Hs.Decls.html#tcdName"><span class="hs-identifier hs-var">tcdName</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass p)
</span><a href="#local-6989586621680952392"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-119"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#getMainDeclBinder"><span class="hs-identifier hs-var">getMainDeclBinder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ValD"><span class="hs-identifier hs-type">ValD</span></a></span><span> </span><span class="annot"><span class="annottext">XValD (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952389"><span class="annot"><span class="annottext">HsBind (GhcPass p)
</span><a href="#local-6989586621680952389"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-120"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsBind (GhcPass p) -&gt; [IdP (GhcPass p)]
forall p idR. CollectPass p =&gt; HsBindLR p idR -&gt; [IdP p]
</span><a href="GHC.Hs.Utils.html#collectHsBindBinders"><span class="hs-identifier hs-var">collectHsBindBinders</span></a></span><span> </span><span class="annot"><span class="annottext">HsBind (GhcPass p)
</span><a href="#local-6989586621680952389"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-122"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680952387"><span class="annot"><span class="annottext">IdP (GhcPass p)
</span><a href="#local-6989586621680952387"><span class="hs-identifier hs-var">name</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[IdP (GhcPass p)]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">IdP (GhcPass p)
</span><a href="#local-6989586621680952387"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-123"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#getMainDeclBinder"><span class="hs-identifier hs-var">getMainDeclBinder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#SigD"><span class="hs-identifier hs-type">SigD</span></a></span><span> </span><span class="annot"><span class="annottext">XSigD (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952385"><span class="annot"><span class="annottext">Sig (GhcPass p)
</span><a href="#local-6989586621680952385"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Sig (GhcPass p) -&gt; [IdP (GhcPass p)]
forall pass. Sig pass -&gt; [IdP pass]
</span><a href="GHC.HsToCore.Docs.html#sigNameNoLoc"><span class="hs-identifier hs-var">sigNameNoLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Sig (GhcPass p)
</span><a href="#local-6989586621680952385"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-124"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#getMainDeclBinder"><span class="hs-identifier hs-var">getMainDeclBinder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ForD"><span class="hs-identifier hs-type">ForD</span></a></span><span> </span><span class="annot"><span class="annottext">XForD (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ForeignImport"><span class="hs-identifier hs-type">ForeignImport</span></a></span><span> </span><span class="annot"><span class="annottext">XForeignImport (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952381"><span class="annot"><span class="annottext">Located (IdP (GhcPass p))
</span><a href="#local-6989586621680952381"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsSigType (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ForeignImport
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">GenLocated SrcSpan (IdGhcP p) -&gt; IdGhcP p
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (IdGhcP p)
Located (IdP (GhcPass p))
</span><a href="#local-6989586621680952381"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-125"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#getMainDeclBinder"><span class="hs-identifier hs-var">getMainDeclBinder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ForD"><span class="hs-identifier hs-type">ForD</span></a></span><span> </span><span class="annot"><span class="annottext">XForD (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ForeignExport"><span class="hs-identifier hs-type">ForeignExport</span></a></span><span> </span><span class="annot"><span class="annottext">XForeignExport (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Located (IdP (GhcPass p))
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsSigType (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ForeignExport
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-126"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#getMainDeclBinder"><span class="hs-identifier hs-var">getMainDeclBinder</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span id="local-6989586621680952726"><span class="annot"><a href="GHC.HsToCore.Docs.html#sigNameNoLoc"><span class="hs-identifier hs-type">sigNameNoLoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#Sig"><span class="hs-identifier hs-type">Sig</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952726"><span class="hs-identifier hs-type">pass</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Extension.html#IdP"><span class="hs-identifier hs-type">IdP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952726"><span class="hs-identifier hs-type">pass</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-129"></span><span id="sigNameNoLoc"><span class="annot"><span class="annottext">sigNameNoLoc :: forall pass. Sig pass -&gt; [IdP pass]
</span><a href="GHC.HsToCore.Docs.html#sigNameNoLoc"><span class="hs-identifier hs-var hs-var">sigNameNoLoc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#TypeSig"><span class="hs-identifier hs-type">TypeSig</span></a></span><span>    </span><span class="annot"><span class="annottext">XTypeSig pass
</span><span class="hs-identifier">_</span></span><span>   </span><span id="local-6989586621680952378"><span class="annot"><span class="annottext">[Located (IdP pass)]
</span><a href="#local-6989586621680952378"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsSigWcType pass
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located (IdP pass) -&gt; IdP pass)
-&gt; [Located (IdP pass)] -&gt; [IdP pass]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdP pass) -&gt; IdP pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (IdP pass)]
</span><a href="#local-6989586621680952378"><span class="hs-identifier hs-var">ns</span></a></span><span>
</span><span id="line-130"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#sigNameNoLoc"><span class="hs-identifier hs-var">sigNameNoLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#ClassOpSig"><span class="hs-identifier hs-type">ClassOpSig</span></a></span><span> </span><span class="annot"><span class="annottext">XClassOpSig pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952376"><span class="annot"><span class="annottext">[Located (IdP pass)]
</span><a href="#local-6989586621680952376"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsSigType pass
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located (IdP pass) -&gt; IdP pass)
-&gt; [Located (IdP pass)] -&gt; [IdP pass]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdP pass) -&gt; IdP pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (IdP pass)]
</span><a href="#local-6989586621680952376"><span class="hs-identifier hs-var">ns</span></a></span><span>
</span><span id="line-131"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#sigNameNoLoc"><span class="hs-identifier hs-var">sigNameNoLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#PatSynSig"><span class="hs-identifier hs-type">PatSynSig</span></a></span><span>  </span><span class="annot"><span class="annottext">XPatSynSig pass
</span><span class="hs-identifier">_</span></span><span>   </span><span id="local-6989586621680952374"><span class="annot"><span class="annottext">[Located (IdP pass)]
</span><a href="#local-6989586621680952374"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsSigType pass
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located (IdP pass) -&gt; IdP pass)
-&gt; [Located (IdP pass)] -&gt; [IdP pass]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdP pass) -&gt; IdP pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (IdP pass)]
</span><a href="#local-6989586621680952374"><span class="hs-identifier hs-var">ns</span></a></span><span>
</span><span id="line-132"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#sigNameNoLoc"><span class="hs-identifier hs-var">sigNameNoLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#SpecSig"><span class="hs-identifier hs-type">SpecSig</span></a></span><span>    </span><span class="annot"><span class="annottext">XSpecSig pass
</span><span class="hs-identifier">_</span></span><span>   </span><span id="local-6989586621680952372"><span class="annot"><span class="annottext">Located (IdP pass)
</span><a href="#local-6989586621680952372"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">[LHsSigType pass]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Located (IdP pass) -&gt; IdP pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdP pass)
</span><a href="#local-6989586621680952372"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-133"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#sigNameNoLoc"><span class="hs-identifier hs-var">sigNameNoLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#InlineSig"><span class="hs-identifier hs-type">InlineSig</span></a></span><span>  </span><span class="annot"><span class="annottext">XInlineSig pass
</span><span class="hs-identifier">_</span></span><span>   </span><span id="local-6989586621680952370"><span class="annot"><span class="annottext">Located (IdP pass)
</span><a href="#local-6989586621680952370"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Located (IdP pass) -&gt; IdP pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdP pass)
</span><a href="#local-6989586621680952370"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-134"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#sigNameNoLoc"><span class="hs-identifier hs-var">sigNameNoLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#FixSig"><span class="hs-identifier hs-type">FixSig</span></a></span><span> </span><span class="annot"><span class="annottext">XFixSig pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#FixitySig"><span class="hs-identifier hs-type">FixitySig</span></a></span><span> </span><span class="annot"><span class="annottext">XFixitySig pass
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952367"><span class="annot"><span class="annottext">[Located (IdP pass)]
</span><a href="#local-6989586621680952367"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located (IdP pass) -&gt; IdP pass)
-&gt; [Located (IdP pass)] -&gt; [IdP pass]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdP pass) -&gt; IdP pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (IdP pass)]
</span><a href="#local-6989586621680952367"><span class="hs-identifier hs-var">ns</span></a></span><span>
</span><span id="line-135"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#sigNameNoLoc"><span class="hs-identifier hs-var">sigNameNoLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Sig pass
</span><span class="hs-identifier">_</span></span><span>                             </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span class="hs-comment">-- Extract the source location where an instance is defined. This is used</span><span>
</span><span id="line-138"></span><span class="hs-comment">-- to correlate InstDecls with their Instance/CoAxiom Names, via the</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- instanceMap.</span><span>
</span><span id="line-140"></span><span id="local-6989586621680952742"><span class="annot"><a href="GHC.HsToCore.Docs.html#getInstLoc"><span class="hs-identifier hs-type">getInstLoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#InstDecl"><span class="hs-identifier hs-type">InstDecl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952742"><span class="hs-identifier hs-type">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span></span><span>
</span><span id="line-141"></span><span id="getInstLoc"><span class="annot"><span class="annottext">getInstLoc :: forall (p :: Pass). InstDecl (GhcPass p) -&gt; SrcSpan
</span><a href="GHC.HsToCore.Docs.html#getInstLoc"><span class="hs-identifier hs-var hs-var">getInstLoc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="hs-glyph">case</span><span>
</span><span id="line-142"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#ClsInstD"><span class="hs-identifier hs-type">ClsInstD</span></a></span><span> </span><span class="annot"><span class="annottext">XClsInstD (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ClsInstDecl"><span class="hs-identifier hs-type">ClsInstDecl</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cid_poly_ty :: forall pass. ClsInstDecl pass -&gt; LHsSigType pass
</span><a href="GHC.Hs.Decls.html#cid_poly_ty"><span class="hs-identifier hs-var">cid_poly_ty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952363"><span class="annot"><span class="annottext">LHsSigType (GhcPass p)
</span><a href="#local-6989586621680952363"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsType (GhcPass p)) -&gt; SrcSpan
forall l e. GenLocated l e -&gt; l
</span><a href="GHC.Types.SrcLoc.html#getLoc"><span class="hs-identifier hs-var">getLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsSigType (GhcPass p) -&gt; GenLocated SrcSpan (HsType (GhcPass p))
forall (p :: Pass). LHsSigType (GhcPass p) -&gt; LHsType (GhcPass p)
</span><a href="GHC.Hs.Type.html#hsSigType"><span class="hs-identifier hs-var">hsSigType</span></a></span><span> </span><span class="annot"><span class="annottext">LHsSigType (GhcPass p)
</span><a href="#local-6989586621680952363"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>  </span><span class="hs-comment">-- The Names of data and type family instances have their SrcSpan's attached</span><span>
</span><span id="line-144"></span><span>  </span><span class="hs-comment">-- to the *type constructor*. For example, the Name &quot;D:R:Foo:Int&quot; would have</span><span>
</span><span id="line-145"></span><span>  </span><span class="hs-comment">-- its SrcSpan attached here:</span><span>
</span><span id="line-146"></span><span>  </span><span class="hs-comment">--   type family Foo a</span><span>
</span><span id="line-147"></span><span>  </span><span class="hs-comment">--   type instance Foo Int = Bool</span><span>
</span><span id="line-148"></span><span>  </span><span class="hs-comment">--                 ^^^</span><span>
</span><span id="line-149"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#DataFamInstD"><span class="hs-identifier hs-type">DataFamInstD</span></a></span><span> </span><span class="annot"><span class="annottext">XDataFamInstD (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#DataFamInstDecl"><span class="hs-identifier hs-type">DataFamInstDecl</span></a></span><span>
</span><span id="line-150"></span><span>    </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dfid_eqn :: forall pass.
DataFamInstDecl pass -&gt; FamInstEqn pass (HsDataDefn pass)
</span><a href="GHC.Hs.Decls.html#dfid_eqn"><span class="hs-identifier hs-var">dfid_eqn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsIB"><span class="hs-identifier hs-type">HsIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsib_body :: forall pass thing. HsImplicitBndrs pass thing -&gt; thing
</span><a href="GHC.Hs.Type.html#hsib_body"><span class="hs-identifier hs-var">hsib_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#FamEqn"><span class="hs-identifier hs-type">FamEqn</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">feqn_tycon :: forall pass rhs. FamEqn pass rhs -&gt; Located (IdP pass)
</span><a href="GHC.Hs.Decls.html#feqn_tycon"><span class="hs-identifier hs-var">feqn_tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621680952353"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952353"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="annot"><span class="annottext">IdP (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952353"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-151"></span><span>  </span><span class="hs-comment">-- Since CoAxioms' Names refer to the whole line for type family instances</span><span>
</span><span id="line-152"></span><span>  </span><span class="hs-comment">-- in particular, we need to dig a bit deeper to pull out the entire</span><span>
</span><span id="line-153"></span><span>  </span><span class="hs-comment">-- equation. This does not happen for data family instances, for some reason.</span><span>
</span><span id="line-154"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#TyFamInstD"><span class="hs-identifier hs-type">TyFamInstD</span></a></span><span> </span><span class="annot"><span class="annottext">XTyFamInstD (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#TyFamInstDecl"><span class="hs-identifier hs-type">TyFamInstDecl</span></a></span><span>
</span><span id="line-155"></span><span>    </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">tfid_eqn :: forall pass. TyFamInstDecl pass -&gt; TyFamInstEqn pass
</span><a href="GHC.Hs.Decls.html#tfid_eqn"><span class="hs-identifier hs-var">tfid_eqn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsIB"><span class="hs-identifier hs-type">HsIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsib_body :: forall pass thing. HsImplicitBndrs pass thing -&gt; thing
</span><a href="GHC.Hs.Type.html#hsib_body"><span class="hs-identifier hs-var">hsib_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#FamEqn"><span class="hs-identifier hs-type">FamEqn</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">feqn_tycon :: forall pass rhs. FamEqn pass rhs -&gt; Located (IdP pass)
</span><a href="GHC.Hs.Decls.html#feqn_tycon"><span class="hs-identifier hs-var">feqn_tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621680952349"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952349"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="annot"><span class="annottext">IdP (GhcPass p)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952349"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="hs-comment">-- | Get all subordinate declarations inside a declaration, and their docs.</span><span>
</span><span id="line-158"></span><span class="hs-comment">-- A subordinate declaration is something like the associate type or data</span><span>
</span><span id="line-159"></span><span class="hs-comment">-- family of a type class.</span><span>
</span><span id="line-160"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#subordinates"><span class="hs-identifier hs-type">subordinates</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-161"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsDecl"><span class="hs-identifier hs-type">HsDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>
</span><span id="line-162"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-163"></span><span id="subordinates"><span class="annot"><span class="annottext">subordinates :: Map RealSrcSpan Name
-&gt; HsDecl (GhcPass 'Renamed)
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="GHC.HsToCore.Docs.html#subordinates"><span class="hs-identifier hs-var hs-var">subordinates</span></a></span></span><span> </span><span id="local-6989586621680952348"><span class="annot"><span class="annottext">Map RealSrcSpan Name
</span><a href="#local-6989586621680952348"><span class="hs-identifier hs-var">instMap</span></a></span></span><span> </span><span id="local-6989586621680952347"><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952347"><span class="hs-identifier hs-var">decl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952347"><span class="hs-identifier hs-var">decl</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-164"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#InstD"><span class="hs-identifier hs-type">InstD</span></a></span><span> </span><span class="annot"><span class="annottext">XInstD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ClsInstD"><span class="hs-identifier hs-type">ClsInstD</span></a></span><span> </span><span class="annot"><span class="annottext">XClsInstD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952346"><span class="annot"><span class="annottext">ClsInstDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952346"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-165"></span><span>    </span><span class="annot"><a href="GHC.Hs.Decls.html#DataFamInstDecl"><span class="hs-identifier hs-type">DataFamInstDecl</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dfid_eqn :: forall pass.
DataFamInstDecl pass -&gt; FamInstEqn pass (HsDataDefn pass)
</span><a href="GHC.Hs.Decls.html#dfid_eqn"><span class="hs-identifier hs-var">dfid_eqn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsIB"><span class="hs-identifier hs-type">HsIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsib_body :: forall pass thing. HsImplicitBndrs pass thing -&gt; thing
</span><a href="GHC.Hs.Type.html#hsib_body"><span class="hs-identifier hs-var">hsib_body</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-166"></span><span>      </span><span class="annot"><a href="GHC.Hs.Decls.html#FamEqn"><span class="hs-identifier hs-type">FamEqn</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">feqn_tycon :: forall pass rhs. FamEqn pass rhs -&gt; Located (IdP pass)
</span><a href="GHC.Hs.Decls.html#feqn_tycon"><span class="hs-identifier hs-var">feqn_tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621680952345"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952345"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="annot"><span class="annottext">IdP (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-167"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">feqn_rhs :: forall pass rhs. FamEqn pass rhs -&gt; rhs
</span><a href="GHC.Hs.Decls.html#feqn_rhs"><span class="hs-identifier hs-var">feqn_rhs</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952343"><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
</span><a href="#local-6989586621680952343"><span class="hs-identifier hs-var">defn</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (DataFamInstDecl (GhcPass 'Renamed))
-&gt; DataFamInstDecl (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (DataFamInstDecl (GhcPass 'Renamed))
 -&gt; DataFamInstDecl (GhcPass 'Renamed))
-&gt; [GenLocated SrcSpan (DataFamInstDecl (GhcPass 'Renamed))]
-&gt; [DataFamInstDecl (GhcPass 'Renamed)]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ClsInstDecl (GhcPass 'Renamed)
-&gt; [GenLocated SrcSpan (DataFamInstDecl (GhcPass 'Renamed))]
forall pass. ClsInstDecl pass -&gt; [LDataFamInstDecl pass]
</span><a href="GHC.Hs.Decls.html#cid_datafam_insts"><span class="hs-identifier hs-var hs-var">cid_datafam_insts</span></a></span><span> </span><span class="annot"><span class="annottext">ClsInstDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952346"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-168"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952341"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map Int HsDocString
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680952341"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952341"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SrcSpan -&gt; Map RealSrcSpan Name -&gt; Maybe Name
forall a. SrcSpan -&gt; Map RealSrcSpan a -&gt; Maybe a
</span><a href="GHC.Types.SrcLoc.html#lookupSrcSpan"><span class="hs-identifier hs-var">lookupSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952345"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Map RealSrcSpan Name
</span><a href="#local-6989586621680952348"><span class="hs-identifier hs-var">instMap</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[(Name, [HsDocString], Map Int HsDocString)]
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952340"><span class="hs-identifier hs-var">dataSubs</span></a></span><span> </span><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
</span><a href="#local-6989586621680952343"><span class="hs-identifier hs-var">defn</span></a></span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#InstD"><span class="hs-identifier hs-type">InstD</span></a></span><span> </span><span class="annot"><span class="annottext">XInstD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#DataFamInstD"><span class="hs-identifier hs-type">DataFamInstD</span></a></span><span> </span><span class="annot"><span class="annottext">XDataFamInstD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#DataFamInstDecl"><span class="hs-identifier hs-type">DataFamInstDecl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsIB"><span class="hs-identifier hs-type">HsIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsib_body :: forall pass thing. HsImplicitBndrs pass thing -&gt; thing
</span><a href="GHC.Hs.Type.html#hsib_body"><span class="hs-identifier hs-var">hsib_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952339"><span class="annot"><span class="annottext">FamEqn (GhcPass 'Renamed) (HsDataDefn (GhcPass 'Renamed))
</span><a href="#local-6989586621680952339"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952340"><span class="hs-identifier hs-var">dataSubs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FamEqn (GhcPass 'Renamed) (HsDataDefn (GhcPass 'Renamed))
-&gt; HsDataDefn (GhcPass 'Renamed)
forall pass rhs. FamEqn pass rhs -&gt; rhs
</span><a href="GHC.Hs.Decls.html#feqn_rhs"><span class="hs-identifier hs-var hs-var">feqn_rhs</span></a></span><span> </span><span class="annot"><span class="annottext">FamEqn (GhcPass 'Renamed) (HsDataDefn (GhcPass 'Renamed))
</span><a href="#local-6989586621680952339"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-172"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#TyClD"><span class="hs-identifier hs-type">TyClD</span></a></span><span> </span><span class="annot"><span class="annottext">XTyClD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952338"><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952338"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed) -&gt; Bool
forall pass. TyClDecl pass -&gt; Bool
</span><a href="GHC.Hs.Decls.html#isClassDecl"><span class="hs-identifier hs-var">isClassDecl</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952338"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952336"><span class="hs-identifier hs-var">classSubs</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952338"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-173"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed) -&gt; Bool
forall pass. TyClDecl pass -&gt; Bool
</span><a href="GHC.Hs.Decls.html#isDataDecl"><span class="hs-identifier hs-var">isDataDecl</span></a></span><span>  </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952338"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952340"><span class="hs-identifier hs-var">dataSubs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed) -&gt; HsDataDefn (GhcPass 'Renamed)
forall pass. TyClDecl pass -&gt; HsDataDefn pass
</span><a href="GHC.Hs.Decls.html#tcdDataDefn"><span class="hs-identifier hs-var hs-var">tcdDataDefn</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952338"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span>  </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-176"></span><span>    </span><span id="local-6989586621680952336"><span class="annot"><span class="annottext">classSubs :: TyClDecl (GhcPass 'Renamed)
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952336"><span class="hs-identifier hs-var hs-var">classSubs</span></a></span></span><span> </span><span id="local-6989586621680952332"><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952332"><span class="hs-identifier hs-var">dd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952331"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952330"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#declTypeDocs"><span class="hs-identifier hs-var">declTypeDocs</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952329"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952329"><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952329"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952330"><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952330"><span class="hs-identifier hs-var">doc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
</span><a href="GHC.HsToCore.Docs.html#classDecls"><span class="hs-identifier hs-var">classDecls</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952332"><span class="hs-identifier hs-var">dd</span></a></span><span>
</span><span id="line-178"></span><span>                   </span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952331"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952331"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed) -&gt; [IdP (GhcPass 'Renamed)]
forall (p :: Pass).
CollectPass (GhcPass p) =&gt;
HsDecl (GhcPass p) -&gt; [IdP (GhcPass p)]
</span><a href="GHC.HsToCore.Docs.html#getMainDeclBinder"><span class="hs-identifier hs-var">getMainDeclBinder</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952329"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed) -&gt; Bool
forall a. HsDecl a -&gt; Bool
</span><a href="GHC.HsToCore.Docs.html#isValD"><span class="hs-identifier hs-var">isValD</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952329"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>                   </span><span class="hs-special">]</span><span>
</span><span id="line-180"></span><span>    </span><span class="annot"><a href="#local-6989586621680952340"><span class="hs-identifier hs-type">dataSubs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsDataDefn"><span class="hs-identifier hs-type">HsDataDefn</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>
</span><span id="line-181"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-182"></span><span>    </span><span id="local-6989586621680952340"><span class="annot"><span class="annottext">dataSubs :: HsDataDefn (GhcPass 'Renamed)
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952340"><span class="hs-identifier hs-var hs-var">dataSubs</span></a></span></span><span> </span><span id="local-6989586621680952326"><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
</span><a href="#local-6989586621680952326"><span class="hs-identifier hs-var">dd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952325"><span class="hs-identifier hs-var">constrs</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, [HsDocString], Map Int HsDocString)]
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952324"><span class="hs-identifier hs-var">fields</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, [HsDocString], Map Int HsDocString)]
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
-&gt; [(Name, [HsDocString], Map Int HsDocString)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952323"><span class="hs-identifier hs-var">derivs</span></a></span><span>
</span><span id="line-183"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-184"></span><span>        </span><span id="local-6989586621680952322"><span class="annot"><span class="annottext">cons :: [ConDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952322"><span class="hs-identifier hs-var hs-var">cons</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (ConDecl (GhcPass 'Renamed))
 -&gt; ConDecl (GhcPass 'Renamed))
-&gt; [GenLocated SrcSpan (ConDecl (GhcPass 'Renamed))]
-&gt; [ConDecl (GhcPass 'Renamed)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (ConDecl (GhcPass 'Renamed))
-&gt; ConDecl (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">([GenLocated SrcSpan (ConDecl (GhcPass 'Renamed))]
 -&gt; [ConDecl (GhcPass 'Renamed)])
-&gt; [GenLocated SrcSpan (ConDecl (GhcPass 'Renamed))]
-&gt; [ConDecl (GhcPass 'Renamed)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
-&gt; [GenLocated SrcSpan (ConDecl (GhcPass 'Renamed))]
forall pass. HsDataDefn pass -&gt; [LConDecl pass]
</span><a href="GHC.Hs.Decls.html#dd_cons"><span class="hs-identifier hs-var hs-var">dd_cons</span></a></span><span> </span><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
</span><a href="#local-6989586621680952326"><span class="hs-identifier hs-var">dd</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-185"></span><span>        </span><span id="local-6989586621680952325"><span class="annot"><span class="annottext">constrs :: [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952325"><span class="hs-identifier hs-var hs-var">constrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621680952320"><span class="hs-identifier hs-var">cname</span></a></span><span>
</span><span id="line-186"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe HsDocString -&gt; [HsDocString]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe HsDocString -&gt; [HsDocString])
-&gt; Maybe HsDocString -&gt; [HsDocString]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(LHsDocString -&gt; HsDocString)
-&gt; Maybe LHsDocString -&gt; Maybe HsDocString
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString -&gt; HsDocString
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe LHsDocString -&gt; Maybe HsDocString)
-&gt; Maybe LHsDocString -&gt; Maybe HsDocString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed) -&gt; Maybe LHsDocString
forall pass. ConDecl pass -&gt; Maybe LHsDocString
</span><a href="GHC.Hs.Decls.html#con_doc"><span class="hs-identifier hs-var hs-var">con_doc</span></a></span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952318"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-187"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#conArgDocs"><span class="hs-identifier hs-var">conArgDocs</span></a></span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952318"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-188"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680952318"><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952318"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ConDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952322"><span class="hs-identifier hs-var">cons</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952320"><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621680952320"><span class="hs-identifier hs-var">cname</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed) -&gt; [GenLocated SrcSpan Name]
</span><a href="GHC.Hs.Decls.html#getConNames"><span class="hs-identifier hs-var">getConNames</span></a></span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952318"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-189"></span><span>        </span><span id="local-6989586621680952324"><span class="annot"><span class="annottext">fields :: [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952324"><span class="hs-identifier hs-var hs-var">fields</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldOcc (GhcPass 'Renamed) -&gt; XCFieldOcc (GhcPass 'Renamed)
forall pass. FieldOcc pass -&gt; XCFieldOcc pass
</span><a href="GHC.Hs.Type.html#extFieldOcc"><span class="hs-identifier hs-var hs-var">extFieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">FieldOcc (GhcPass 'Renamed)
</span><a href="#local-6989586621680952314"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe HsDocString -&gt; [HsDocString]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe HsDocString -&gt; [HsDocString])
-&gt; Maybe HsDocString -&gt; [HsDocString]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(LHsDocString -&gt; HsDocString)
-&gt; Maybe LHsDocString -&gt; Maybe HsDocString
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString -&gt; HsDocString
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe LHsDocString
</span><a href="#local-6989586621680952313"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map Int HsDocString
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-190"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#RecCon"><span class="hs-identifier hs-type">RecCon</span></a></span><span> </span><span id="local-6989586621680952311"><span class="annot"><span class="annottext">Located [LConDeclField (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952311"><span class="hs-identifier hs-var">flds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(ConDecl (GhcPass 'Renamed)
 -&gt; HsConDetails
      (HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed)))
      (Located [LConDeclField (GhcPass 'Renamed)]))
-&gt; [ConDecl (GhcPass 'Renamed)]
-&gt; [HsConDetails
      (HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed)))
      (Located [LConDeclField (GhcPass 'Renamed)])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
-&gt; HsConDetails
     (HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed)))
     (Located [LConDeclField (GhcPass 'Renamed)])
</span><a href="GHC.Hs.Decls.html#getConArgs"><span class="hs-identifier hs-var">getConArgs</span></a></span><span> </span><span class="annot"><span class="annottext">[ConDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952322"><span class="hs-identifier hs-var">cons</span></a></span><span>
</span><span id="line-191"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#ConDeclField"><span class="hs-identifier hs-type">ConDeclField</span></a></span><span> </span><span class="annot"><span class="annottext">XConDeclField (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952308"><span class="annot"><span class="annottext">[LFieldOcc (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952308"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952313"><span class="annot"><span class="annottext">Maybe LHsDocString
</span><a href="#local-6989586621680952313"><span class="hs-identifier hs-var">doc</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located [LConDeclField (GhcPass 'Renamed)]
-&gt; [LConDeclField (GhcPass 'Renamed)]
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located [LConDeclField (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952311"><span class="hs-identifier hs-var">flds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-192"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952314"><span class="annot"><span class="annottext">FieldOcc (GhcPass 'Renamed)
</span><a href="#local-6989586621680952314"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[LFieldOcc (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952308"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-193"></span><span>        </span><span id="local-6989586621680952323"><span class="annot"><span class="annottext">derivs :: [(Name, [HsDocString], Map Int HsDocString)]
</span><a href="#local-6989586621680952323"><span class="hs-identifier hs-var hs-var">derivs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952307"><span class="hs-identifier hs-var">instName</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LHsDocString -&gt; HsDocString
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952306"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map Int HsDocString
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680952305"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952305"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952306"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952306"><span class="hs-identifier hs-var">doc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
 -&gt; Maybe (SrcSpan, LHsDocString))
-&gt; [HsImplicitBndrs
      (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
-&gt; [(SrcSpan, LHsDocString)]
forall a b. (a -&gt; Maybe b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/Data.Maybe.html#mapMaybe"><span class="hs-identifier hs-var">mapMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; Maybe (SrcSpan, LHsDocString)
</span><a href="#local-6989586621680952303"><span class="hs-identifier hs-var">extract_deriv_ty</span></a></span><span> </span><span class="annot"><span class="annottext">(LBangType (GhcPass 'Renamed) -&gt; Maybe (SrcSpan, LHsDocString))
-&gt; (HsImplicitBndrs
      (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
    -&gt; LBangType (GhcPass 'Renamed))
-&gt; HsImplicitBndrs
     (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
-&gt; Maybe (SrcSpan, LHsDocString)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
-&gt; LBangType (GhcPass 'Renamed)
forall pass thing. HsImplicitBndrs pass thing -&gt; thing
</span><a href="GHC.Hs.Type.html#hsib_body"><span class="hs-identifier hs-var hs-var">hsib_body</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([HsImplicitBndrs
    (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
 -&gt; [(SrcSpan, LHsDocString)])
-&gt; [HsImplicitBndrs
      (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
-&gt; [(SrcSpan, LHsDocString)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-195"></span><span>                                </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))
 -&gt; [HsImplicitBndrs
       (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))])
-&gt; [GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))]
-&gt; [HsImplicitBndrs
      (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated
  SrcSpan
  [HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
-&gt; [HsImplicitBndrs
      (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated
   SrcSpan
   [HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
 -&gt; [HsImplicitBndrs
       (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))])
-&gt; (GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))
    -&gt; GenLocated
         SrcSpan
         [HsImplicitBndrs
            (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))])
-&gt; GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))
-&gt; [HsImplicitBndrs
      (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsDerivingClause (GhcPass 'Renamed)
-&gt; GenLocated
     SrcSpan
     [HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
forall pass. HsDerivingClause pass -&gt; Located [LHsSigType pass]
</span><a href="GHC.Hs.Decls.html#deriv_clause_tys"><span class="hs-identifier hs-var hs-var">deriv_clause_tys</span></a></span><span> </span><span class="annot"><span class="annottext">(HsDerivingClause (GhcPass 'Renamed)
 -&gt; GenLocated
      SrcSpan
      [HsImplicitBndrs
         (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))])
-&gt; (GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))
    -&gt; HsDerivingClause (GhcPass 'Renamed))
-&gt; GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))
-&gt; GenLocated
     SrcSpan
     [HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))
-&gt; HsDerivingClause (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))]
 -&gt; [HsImplicitBndrs
       (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))])
-&gt; [GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))]
-&gt; [HsImplicitBndrs
      (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-196"></span><span>                                </span><span class="annot"><span class="annottext">GenLocated
  SrcSpan [GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))]
-&gt; [GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))]
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated
   SrcSpan [GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))]
 -&gt; [GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))])
-&gt; GenLocated
     SrcSpan [GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))]
-&gt; [GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
-&gt; GenLocated
     SrcSpan [GenLocated SrcSpan (HsDerivingClause (GhcPass 'Renamed))]
forall pass. HsDataDefn pass -&gt; HsDeriving pass
</span><a href="GHC.Hs.Decls.html#dd_derivs"><span class="hs-identifier hs-var hs-var">dd_derivs</span></a></span><span> </span><span class="annot"><span class="annottext">HsDataDefn (GhcPass 'Renamed)
</span><a href="#local-6989586621680952326"><span class="hs-identifier hs-var">dd</span></a></span><span>
</span><span id="line-197"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680952307"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952307"><span class="hs-identifier hs-var">instName</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SrcSpan -&gt; Map RealSrcSpan Name -&gt; Maybe Name
forall a. SrcSpan -&gt; Map RealSrcSpan a -&gt; Maybe a
</span><a href="GHC.Types.SrcLoc.html#lookupSrcSpan"><span class="hs-identifier hs-var">lookupSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952305"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Map RealSrcSpan Name
</span><a href="#local-6989586621680952348"><span class="hs-identifier hs-var">instMap</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span>        </span><span class="annot"><a href="#local-6989586621680952303"><span class="hs-identifier hs-type">extract_deriv_ty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#LHsDocString"><span class="hs-identifier hs-type">LHsDocString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-200"></span><span>        </span><span id="local-6989586621680952303"><span class="annot"><span class="annottext">extract_deriv_ty :: LBangType (GhcPass 'Renamed) -&gt; Maybe (SrcSpan, LHsDocString)
</span><a href="#local-6989586621680952303"><span class="hs-identifier hs-var hs-var">extract_deriv_ty</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621680952299"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952299"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621680952298"><span class="annot"><span class="annottext">HsType (GhcPass 'Renamed)
</span><a href="#local-6989586621680952298"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-201"></span><span>          </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsType (GhcPass 'Renamed)
</span><a href="#local-6989586621680952298"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-202"></span><span>            </span><span class="hs-comment">-- deriving (forall a. C a {- ^ Doc comment -})</span><span>
</span><span id="line-203"></span><span>            </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllTy"><span class="hs-identifier hs-type">HsForAllTy</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_tele :: forall pass. HsType pass -&gt; HsForAllTelescope pass
</span><a href="GHC.Hs.Type.html#hst_tele"><span class="hs-identifier hs-var">hst_tele</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllInvis"><span class="hs-identifier hs-type">HsForAllInvis</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>
</span><span id="line-204"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: forall pass. HsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsDocTy"><span class="hs-identifier hs-type">HsDocTy</span></a></span><span> </span><span class="annot"><span class="annottext">XDocTy (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952292"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952292"><span class="hs-identifier hs-var">doc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-205"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(SrcSpan, LHsDocString) -&gt; Maybe (SrcSpan, LHsDocString)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952299"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952292"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>            </span><span class="hs-comment">-- deriving (C a {- ^ Doc comment -})</span><span>
</span><span id="line-207"></span><span>            </span><span class="annot"><a href="GHC.Hs.Type.html#HsDocTy"><span class="hs-identifier hs-type">HsDocTy</span></a></span><span> </span><span class="annot"><span class="annottext">XDocTy (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952291"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952291"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(SrcSpan, LHsDocString) -&gt; Maybe (SrcSpan, LHsDocString)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680952299"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952291"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>            </span><span class="annot"><span class="annottext">HsType (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (SrcSpan, LHsDocString)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-209"></span><span>
</span><span id="line-210"></span><span class="hs-comment">-- | Extract constructor argument docs from inside constructor decls.</span><span>
</span><span id="line-211"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#conArgDocs"><span class="hs-identifier hs-type">conArgDocs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#ConDecl"><span class="hs-identifier hs-type">ConDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span id="conArgDocs"><span class="annot"><span class="annottext">conArgDocs :: ConDecl (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#conArgDocs"><span class="hs-identifier hs-var hs-var">conArgDocs</span></a></span></span><span> </span><span id="local-6989586621680952290"><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952290"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
-&gt; HsConDetails
     (HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed)))
     (Located [LConDeclField (GhcPass 'Renamed)])
</span><a href="GHC.Hs.Decls.html#getConArgs"><span class="hs-identifier hs-var">getConArgs</span></a></span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952290"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-213"></span><span>                   </span><span class="annot"><a href="GHC.Hs.Type.html#PrefixCon"><span class="hs-identifier hs-type">PrefixCon</span></a></span><span> </span><span id="local-6989586621680952288"><span class="annot"><span class="annottext">[HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
</span><a href="#local-6989586621680952288"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [HsType (GhcPass 'Renamed)] -&gt; Map Int HsDocString
forall {k} {pass}.
(Ord k, Enum k) =&gt;
k -&gt; [HsType pass] -&gt; Map k HsDocString
</span><a href="#local-6989586621680952287"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
 -&gt; HsType (GhcPass 'Renamed))
-&gt; [HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
-&gt; [HsType (GhcPass 'Renamed)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed))
-&gt; (HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
    -&gt; LBangType (GhcPass 'Renamed))
-&gt; HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
-&gt; HsType (GhcPass 'Renamed)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
-&gt; LBangType (GhcPass 'Renamed)
forall pass a. HsScaled pass a -&gt; a
</span><a href="GHC.Hs.Type.html#hsScaledThing"><span class="hs-identifier hs-var">hsScaledThing</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))]
</span><a href="#local-6989586621680952288"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[HsType (GhcPass 'Renamed)]
-&gt; [HsType (GhcPass 'Renamed)] -&gt; [HsType (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[HsType (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952285"><span class="hs-identifier hs-var">ret</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-214"></span><span>                   </span><span class="annot"><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-type">InfixCon</span></a></span><span> </span><span id="local-6989586621680952283"><span class="annot"><span class="annottext">HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952283"><span class="hs-identifier hs-var">arg1</span></a></span></span><span> </span><span id="local-6989586621680952282"><span class="annot"><span class="annottext">HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952282"><span class="hs-identifier hs-var">arg2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [HsType (GhcPass 'Renamed)] -&gt; Map Int HsDocString
forall {k} {pass}.
(Ord k, Enum k) =&gt;
k -&gt; [HsType pass] -&gt; Map k HsDocString
</span><a href="#local-6989586621680952287"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
-&gt; LBangType (GhcPass 'Renamed)
forall pass a. HsScaled pass a -&gt; a
</span><a href="GHC.Hs.Type.html#hsScaledThing"><span class="hs-identifier hs-var">hsScaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952283"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-215"></span><span>                                                </span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
-&gt; LBangType (GhcPass 'Renamed)
forall pass a. HsScaled pass a -&gt; a
</span><a href="GHC.Hs.Type.html#hsScaledThing"><span class="hs-identifier hs-var">hsScaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">HsScaled (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952282"><span class="hs-identifier hs-var">arg2</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[HsType (GhcPass 'Renamed)]
-&gt; [HsType (GhcPass 'Renamed)] -&gt; [HsType (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[HsType (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952285"><span class="hs-identifier hs-var">ret</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span>                   </span><span class="annot"><a href="GHC.Hs.Type.html#RecCon"><span class="hs-identifier hs-type">RecCon</span></a></span><span> </span><span class="annot"><span class="annottext">Located [LConDeclField (GhcPass 'Renamed)]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [HsType (GhcPass 'Renamed)] -&gt; Map Int HsDocString
forall {k} {pass}.
(Ord k, Enum k) =&gt;
k -&gt; [HsType pass] -&gt; Map k HsDocString
</span><a href="#local-6989586621680952287"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">[HsType (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952285"><span class="hs-identifier hs-var">ret</span></a></span><span>
</span><span id="line-217"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-218"></span><span>    </span><span id="local-6989586621680952287"><span class="annot"><span class="annottext">go :: k -&gt; [HsType pass] -&gt; Map k HsDocString
</span><a href="#local-6989586621680952287"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680952277"><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680952277"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(k, HsDocString)] -&gt; Map k HsDocString
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">M.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">([(k, HsDocString)] -&gt; Map k HsDocString)
-&gt; ([HsType pass] -&gt; [(k, HsDocString)])
-&gt; [HsType pass]
-&gt; Map k HsDocString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe (k, HsDocString)] -&gt; [(k, HsDocString)]
forall a. [Maybe a] -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#catMaybes"><span class="hs-identifier hs-var">catMaybes</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe (k, HsDocString)] -&gt; [(k, HsDocString)])
-&gt; ([HsType pass] -&gt; [Maybe (k, HsDocString)])
-&gt; [HsType pass]
-&gt; [(k, HsDocString)]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(k -&gt; HsType pass -&gt; Maybe (k, HsDocString))
-&gt; [k] -&gt; [HsType pass] -&gt; [Maybe (k, HsDocString)]
forall a b c. (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="../../base/src/GHC.List.html#zipWith"><span class="hs-identifier hs-var">zipWith</span></a></span><span> </span><span class="annot"><span class="annottext">k -&gt; HsType pass -&gt; Maybe (k, HsDocString)
forall {a} {pass}. a -&gt; HsType pass -&gt; Maybe (a, HsDocString)
</span><a href="#local-6989586621680952274"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680952277"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span>
</span><span id="line-219"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-220"></span><span>        </span><span id="local-6989586621680952274"><span class="annot"><span class="annottext">f :: a -&gt; HsType pass -&gt; Maybe (a, HsDocString)
</span><a href="#local-6989586621680952274"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680952273"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680952273"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsDocTy"><span class="hs-identifier hs-type">HsDocTy</span></a></span><span> </span><span class="annot"><span class="annottext">XDocTy pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsType pass
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952272"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952272"><span class="hs-identifier hs-var">lds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, HsDocString) -&gt; Maybe (a, HsDocString)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680952273"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsDocString -&gt; HsDocString
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952272"><span class="hs-identifier hs-var">lds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-221"></span><span>        </span><span class="annot"><a href="#local-6989586621680952274"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span id="local-6989586621680952271"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680952271"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsBangTy"><span class="hs-identifier hs-type">HsBangTy</span></a></span><span> </span><span class="annot"><span class="annottext">XBangTy pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsSrcBang
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsDocTy"><span class="hs-identifier hs-type">HsDocTy</span></a></span><span> </span><span class="annot"><span class="annottext">XDocTy pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsType pass
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952269"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952269"><span class="hs-identifier hs-var">lds</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, HsDocString) -&gt; Maybe (a, HsDocString)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680952271"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsDocString -&gt; HsDocString
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952269"><span class="hs-identifier hs-var">lds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span>        </span><span class="annot"><a href="#local-6989586621680952274"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsType pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (a, HsDocString)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span>    </span><span id="local-6989586621680952285"><span class="annot"><span class="annottext">ret :: [HsType (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952285"><span class="hs-identifier hs-var hs-var">ret</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952290"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-225"></span><span>            </span><span class="annot"><a href="GHC.Hs.Decls.html#ConDeclGADT"><span class="hs-identifier hs-type">ConDeclGADT</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">con_res_ty :: forall pass. ConDecl pass -&gt; LHsType pass
</span><a href="GHC.Hs.Decls.html#con_res_ty"><span class="hs-identifier hs-var">con_res_ty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952266"><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed)
</span><a href="#local-6989586621680952266"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed)
</span><a href="#local-6989586621680952266"><span class="hs-identifier hs-var">res_ty</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-226"></span><span>            </span><span class="annot"><span class="annottext">ConDecl (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span id="local-6989586621680952674"><span class="annot"><a href="GHC.HsToCore.Docs.html#isValD"><span class="hs-identifier hs-type">isValD</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsDecl"><span class="hs-identifier hs-type">HsDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952674"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-229"></span><span id="isValD"><span class="annot"><span class="annottext">isValD :: forall a. HsDecl a -&gt; Bool
</span><a href="GHC.HsToCore.Docs.html#isValD"><span class="hs-identifier hs-var hs-var">isValD</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ValD"><span class="hs-identifier hs-type">ValD</span></a></span><span> </span><span class="annot"><span class="annottext">XValD a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsBind a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-230"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#isValD"><span class="hs-identifier hs-var">isValD</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- | All the sub declarations of a class (that we handle), ordered by</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- source location, with documentation attached if it exists.</span><span>
</span><span id="line-234"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#classDecls"><span class="hs-identifier hs-type">classDecls</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#TyClDecl"><span class="hs-identifier hs-type">TyClDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-235"></span><span id="classDecls"><span class="annot"><span class="annottext">classDecls :: TyClDecl (GhcPass 'Renamed)
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
</span><a href="GHC.HsToCore.Docs.html#classDecls"><span class="hs-identifier hs-var hs-var">classDecls</span></a></span></span><span> </span><span id="local-6989586621680952265"><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952265"><span class="hs-identifier hs-var">class_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(LHsDecl (GhcPass 'Renamed), [HsDocString])]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall a doc. [(LHsDecl a, doc)] -&gt; [(LHsDecl a, doc)]
</span><a href="GHC.HsToCore.Docs.html#filterDecls"><span class="hs-identifier hs-var">filterDecls</span></a></span><span> </span><span class="annot"><span class="annottext">([(LHsDecl (GhcPass 'Renamed), [HsDocString])]
 -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; ([LHsDecl (GhcPass 'Renamed)]
    -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; [LHsDecl (GhcPass 'Renamed)]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall pass. [LHsDecl pass] -&gt; [(LHsDecl pass, [HsDocString])]
</span><a href="GHC.HsToCore.Docs.html#collectDocs"><span class="hs-identifier hs-var">collectDocs</span></a></span><span> </span><span class="annot"><span class="annottext">([LHsDecl (GhcPass 'Renamed)]
 -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; ([LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)])
-&gt; [LHsDecl (GhcPass 'Renamed)]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [Located a] -&gt; [Located a]
</span><a href="GHC.Types.SrcLoc.html#sortLocated"><span class="hs-identifier hs-var">sortLocated</span></a></span><span> </span><span class="annot"><span class="annottext">([LHsDecl (GhcPass 'Renamed)]
 -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; [LHsDecl (GhcPass 'Renamed)]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952261"><span class="hs-identifier hs-var">decls</span></a></span><span>
</span><span id="line-236"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-237"></span><span>    </span><span id="local-6989586621680952261"><span class="annot"><span class="annottext">decls :: [LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952261"><span class="hs-identifier hs-var hs-var">decls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952260"><span class="hs-identifier hs-var">docs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952259"><span class="hs-identifier hs-var">defs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952258"><span class="hs-identifier hs-var">sigs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952257"><span class="hs-identifier hs-var">ats</span></a></span><span>
</span><span id="line-238"></span><span>    </span><span id="local-6989586621680952260"><span class="annot"><span class="annottext">docs :: [LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952260"><span class="hs-identifier hs-var hs-var">docs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyClDecl (GhcPass 'Renamed) -&gt; [Located DocDecl])
-&gt; (DocDecl -&gt; HsDecl (GhcPass 'Renamed))
-&gt; TyClDecl (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed) -&gt; [Located DocDecl]
forall pass. TyClDecl pass -&gt; [Located DocDecl]
</span><a href="GHC.Hs.Decls.html#tcdDocs"><span class="hs-identifier hs-var hs-var">tcdDocs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XDocD (GhcPass 'Renamed) -&gt; DocDecl -&gt; HsDecl (GhcPass 'Renamed)
forall p. XDocD p -&gt; DocDecl -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#DocD"><span class="hs-identifier hs-var">DocD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XDocD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952265"><span class="hs-identifier hs-var">class_</span></a></span><span>
</span><span id="line-239"></span><span>    </span><span id="local-6989586621680952259"><span class="annot"><span class="annottext">defs :: [LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952259"><span class="hs-identifier hs-var hs-var">defs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyClDecl (GhcPass 'Renamed)
 -&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))])
-&gt; (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)
    -&gt; HsDecl (GhcPass 'Renamed))
-&gt; TyClDecl (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
forall a. Bag a -&gt; [a]
</span><a href="GHC.Data.Bag.html#bagToList"><span class="hs-identifier hs-var">bagToList</span></a></span><span> </span><span class="annot"><span class="annottext">(Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))
 -&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))])
-&gt; (TyClDecl (GhcPass 'Renamed)
    -&gt; Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))
-&gt; TyClDecl (GhcPass 'Renamed)
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
-&gt; Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))
forall pass. TyClDecl pass -&gt; LHsBinds pass
</span><a href="GHC.Hs.Decls.html#tcdMeths"><span class="hs-identifier hs-var hs-var">tcdMeths</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XValD (GhcPass 'Renamed)
-&gt; HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)
-&gt; HsDecl (GhcPass 'Renamed)
forall p. XValD p -&gt; HsBind p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#ValD"><span class="hs-identifier hs-var">ValD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XValD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952265"><span class="hs-identifier hs-var">class_</span></a></span><span>
</span><span id="line-240"></span><span>    </span><span id="local-6989586621680952258"><span class="annot"><span class="annottext">sigs :: [LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952258"><span class="hs-identifier hs-var hs-var">sigs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyClDecl (GhcPass 'Renamed) -&gt; [Located (Sig (GhcPass 'Renamed))])
-&gt; (Sig (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed))
-&gt; TyClDecl (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed) -&gt; [Located (Sig (GhcPass 'Renamed))]
forall pass. TyClDecl pass -&gt; [LSig pass]
</span><a href="GHC.Hs.Decls.html#tcdSigs"><span class="hs-identifier hs-var hs-var">tcdSigs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XSigD (GhcPass 'Renamed)
-&gt; Sig (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed)
forall p. XSigD p -&gt; Sig p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#SigD"><span class="hs-identifier hs-var">SigD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XSigD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952265"><span class="hs-identifier hs-var">class_</span></a></span><span>
</span><span id="line-241"></span><span>    </span><span id="local-6989586621680952257"><span class="annot"><span class="annottext">ats :: [LHsDecl (GhcPass 'Renamed)]
</span><a href="#local-6989586621680952257"><span class="hs-identifier hs-var hs-var">ats</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyClDecl (GhcPass 'Renamed)
 -&gt; [Located (FamilyDecl (GhcPass 'Renamed))])
-&gt; (FamilyDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed))
-&gt; TyClDecl (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
-&gt; [Located (FamilyDecl (GhcPass 'Renamed))]
forall pass. TyClDecl pass -&gt; [LFamilyDecl pass]
</span><a href="GHC.Hs.Decls.html#tcdATs"><span class="hs-identifier hs-var hs-var">tcdATs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XTyClD (GhcPass 'Renamed)
-&gt; TyClDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed)
forall p. XTyClD p -&gt; TyClDecl p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#TyClD"><span class="hs-identifier hs-var">TyClD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XTyClD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">(TyClDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed))
-&gt; (FamilyDecl (GhcPass 'Renamed) -&gt; TyClDecl (GhcPass 'Renamed))
-&gt; FamilyDecl (GhcPass 'Renamed)
-&gt; HsDecl (GhcPass 'Renamed)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">XFamDecl (GhcPass 'Renamed)
-&gt; FamilyDecl (GhcPass 'Renamed) -&gt; TyClDecl (GhcPass 'Renamed)
forall pass. XFamDecl pass -&gt; FamilyDecl pass -&gt; TyClDecl pass
</span><a href="GHC.Hs.Decls.html#FamDecl"><span class="hs-identifier hs-var">FamDecl</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XFamDecl (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TyClDecl (GhcPass 'Renamed)
</span><a href="#local-6989586621680952265"><span class="hs-identifier hs-var">class_</span></a></span><span>
</span><span id="line-242"></span><span>
</span><span id="line-243"></span><span class="hs-comment">-- | Extract function argument docs from inside top-level decls.</span><span>
</span><span id="line-244"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#declTypeDocs"><span class="hs-identifier hs-type">declTypeDocs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsDecl"><span class="hs-identifier hs-type">HsDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-245"></span><span id="declTypeDocs"><span class="annot"><span class="annottext">declTypeDocs :: HsDecl (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#declTypeDocs"><span class="hs-identifier hs-var hs-var">declTypeDocs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="hs-glyph">case</span><span>
</span><span id="line-246"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#SigD"><span class="hs-identifier hs-type">SigD</span></a></span><span>  </span><span class="annot"><span class="annottext">XSigD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#TypeSig"><span class="hs-identifier hs-type">TypeSig</span></a></span><span> </span><span class="annot"><span class="annottext">XTypeSig (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GenLocated SrcSpan (IdP (GhcPass 'Renamed))]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952247"><span class="annot"><span class="annottext">LHsSigWcType (GhcPass 'Renamed)
</span><a href="#local-6989586621680952247"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsType (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#typeDocs"><span class="hs-identifier hs-var">typeDocs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsSigWcType (GhcPass 'Renamed) -&gt; LBangType (GhcPass 'Renamed)
forall pass. LHsSigWcType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hsSigWcType"><span class="hs-identifier hs-var">hsSigWcType</span></a></span><span> </span><span class="annot"><span class="annottext">LHsSigWcType (GhcPass 'Renamed)
</span><a href="#local-6989586621680952247"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-247"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#SigD"><span class="hs-identifier hs-type">SigD</span></a></span><span>  </span><span class="annot"><span class="annottext">XSigD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#ClassOpSig"><span class="hs-identifier hs-type">ClassOpSig</span></a></span><span> </span><span class="annot"><span class="annottext">XClassOpSig (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GenLocated SrcSpan (IdP (GhcPass 'Renamed))]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952244"><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952244"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsType (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#typeDocs"><span class="hs-identifier hs-var">typeDocs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
-&gt; LBangType (GhcPass 'Renamed)
forall (p :: Pass). LHsSigType (GhcPass p) -&gt; LHsType (GhcPass p)
</span><a href="GHC.Hs.Type.html#hsSigType"><span class="hs-identifier hs-var">hsSigType</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952244"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-248"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#SigD"><span class="hs-identifier hs-type">SigD</span></a></span><span>  </span><span class="annot"><span class="annottext">XSigD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#PatSynSig"><span class="hs-identifier hs-type">PatSynSig</span></a></span><span> </span><span class="annot"><span class="annottext">XPatSynSig (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GenLocated SrcSpan (IdP (GhcPass 'Renamed))]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952243"><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952243"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsType (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#typeDocs"><span class="hs-identifier hs-var">typeDocs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
-&gt; LBangType (GhcPass 'Renamed)
forall (p :: Pass). LHsSigType (GhcPass p) -&gt; LHsType (GhcPass p)
</span><a href="GHC.Hs.Type.html#hsSigType"><span class="hs-identifier hs-var">hsSigType</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952243"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-249"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#ForD"><span class="hs-identifier hs-type">ForD</span></a></span><span>  </span><span class="annot"><span class="annottext">XForD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ForeignImport"><span class="hs-identifier hs-type">ForeignImport</span></a></span><span> </span><span class="annot"><span class="annottext">XForeignImport (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (IdP (GhcPass 'Renamed))
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952242"><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952242"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="annot"><span class="annottext">ForeignImport
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsType (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#typeDocs"><span class="hs-identifier hs-var">typeDocs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
-&gt; LBangType (GhcPass 'Renamed)
forall (p :: Pass). LHsSigType (GhcPass p) -&gt; LHsType (GhcPass p)
</span><a href="GHC.Hs.Type.html#hsSigType"><span class="hs-identifier hs-var">hsSigType</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplicitBndrs (GhcPass 'Renamed) (LBangType (GhcPass 'Renamed))
</span><a href="#local-6989586621680952242"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-250"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#TyClD"><span class="hs-identifier hs-type">TyClD</span></a></span><span> </span><span class="annot"><span class="annottext">XTyClD (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#SynDecl"><span class="hs-identifier hs-type">SynDecl</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">tcdRhs :: forall pass. TyClDecl pass -&gt; LHsType pass
</span><a href="GHC.Hs.Decls.html#tcdRhs"><span class="hs-identifier hs-var">tcdRhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952239"><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed)
</span><a href="#local-6989586621680952239"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsType (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#typeDocs"><span class="hs-identifier hs-var">typeDocs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed) -&gt; HsType (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LBangType (GhcPass 'Renamed)
</span><a href="#local-6989586621680952239"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-251"></span><span>  </span><span class="annot"><span class="annottext">HsDecl (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span>                                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Map Int HsDocString
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span id="local-6989586621680952784"><span class="annot"><a href="GHC.HsToCore.Docs.html#nubByName"><span class="hs-identifier hs-type">nubByName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680952784"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680952784"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680952784"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-254"></span><span id="nubByName"><span class="annot"><span class="annottext">nubByName :: forall a. (a -&gt; Name) -&gt; [a] -&gt; [a]
</span><a href="GHC.HsToCore.Docs.html#nubByName"><span class="hs-identifier hs-var hs-var">nubByName</span></a></span></span><span> </span><span id="local-6989586621680952238"><span class="annot"><span class="annottext">a -&gt; Name
</span><a href="#local-6989586621680952238"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680952237"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680952237"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621680952236"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680952237"><span class="hs-identifier hs-var">ns</span></a></span><span>
</span><span id="line-255"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-256"></span><span>    </span><span id="local-6989586621680952236"><span class="annot"><span class="annottext">go :: NameSet -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621680952236"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-257"></span><span>    </span><span class="annot"><a href="#local-6989586621680952236"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680952234"><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680952234"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680952233"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680952233"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680952232"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680952232"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952231"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet -&gt; Bool
</span><a href="GHC.Types.Name.Set.html#elemNameSet"><span class="hs-operator hs-var">`elemNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680952234"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621680952236"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680952234"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680952232"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-259"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680952229"><span class="annot"><span class="annottext">s' :: NameSet
</span><a href="#local-6989586621680952229"><span class="hs-identifier hs-var hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#extendNameSet"><span class="hs-identifier hs-var">extendNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680952234"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680952231"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-260"></span><span>                            </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680952233"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621680952236"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680952229"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680952232"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-261"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-262"></span><span>        </span><span id="local-6989586621680952231"><span class="annot"><span class="annottext">y :: Name
</span><a href="#local-6989586621680952231"><span class="hs-identifier hs-var hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Name
</span><a href="#local-6989586621680952238"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680952233"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span class="hs-comment">-- | Extract function argument docs from inside types.</span><span>
</span><span id="line-265"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#typeDocs"><span class="hs-identifier hs-type">typeDocs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-266"></span><span id="typeDocs"><span class="annot"><span class="annottext">typeDocs :: HsType (GhcPass 'Renamed) -&gt; Map Int HsDocString
</span><a href="GHC.HsToCore.Docs.html#typeDocs"><span class="hs-identifier hs-var hs-var">typeDocs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; HsType (GhcPass 'Renamed) -&gt; Map Int HsDocString
forall {k} {pass}.
(Ord k, Num k) =&gt;
k -&gt; HsType pass -&gt; Map k HsDocString
</span><a href="#local-6989586621680952227"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-267"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-268"></span><span>    </span><span id="local-6989586621680952227"><span class="annot"><span class="annottext">go :: k -&gt; HsType pass -&gt; Map k HsDocString
</span><a href="#local-6989586621680952227"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680952219"><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680952219"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="hs-glyph">case</span><span>
</span><span id="line-269"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllTy"><span class="hs-identifier hs-type">HsForAllTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_body :: forall pass. HsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952218"><span class="annot"><span class="annottext">LHsType pass
</span><a href="#local-6989586621680952218"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-special">}</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">k -&gt; HsType pass -&gt; Map k HsDocString
</span><a href="#local-6989586621680952227"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680952219"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType pass -&gt; HsType pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType pass
</span><a href="#local-6989586621680952218"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-270"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsQualTy"><span class="hs-identifier hs-type">HsQualTy</span></a></span><span>   </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_body :: forall pass. HsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680952216"><span class="annot"><span class="annottext">LHsType pass
</span><a href="#local-6989586621680952216"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-special">}</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">k -&gt; HsType pass -&gt; Map k HsDocString
</span><a href="#local-6989586621680952227"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680952219"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType pass -&gt; HsType pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType pass
</span><a href="#local-6989586621680952216"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsFunTy"><span class="hs-identifier hs-type">HsFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">XFunTy pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsArrow pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType pass -&gt; HsType pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="GHC.Hs.Type.html#HsDocTy"><span class="hs-identifier hs-type">HsDocTy</span></a></span><span> </span><span class="annot"><span class="annottext">XDocTy pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsType pass
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952214"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952214"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680952213"><span class="annot"><span class="annottext">LHsType pass
</span><a href="#local-6989586621680952213"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">k -&gt; HsDocString -&gt; Map k HsDocString -&gt; Map k HsDocString
forall k a. Ord k =&gt; k -&gt; a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#insert"><span class="hs-identifier hs-var">M.insert</span></a></span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680952219"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsDocString -&gt; HsDocString
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952214"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Map k HsDocString -&gt; Map k HsDocString)
-&gt; Map k HsDocString -&gt; Map k HsDocString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">k -&gt; HsType pass -&gt; Map k HsDocString
</span><a href="#local-6989586621680952227"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680952219"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">k -&gt; k -&gt; k
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">k
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType pass -&gt; HsType pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType pass
</span><a href="#local-6989586621680952213"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-272"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsFunTy"><span class="hs-identifier hs-type">HsFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">XFunTy pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsArrow pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsType pass
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952210"><span class="annot"><span class="annottext">LHsType pass
</span><a href="#local-6989586621680952210"><span class="hs-identifier hs-var">ty</span></a></span></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">k -&gt; HsType pass -&gt; Map k HsDocString
</span><a href="#local-6989586621680952227"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680952219"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">k -&gt; k -&gt; k
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">k
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType pass -&gt; HsType pass
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType pass
</span><a href="#local-6989586621680952210"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-273"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsDocTy"><span class="hs-identifier hs-type">HsDocTy</span></a></span><span> </span><span class="annot"><span class="annottext">XDocTy pass
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsType pass
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952209"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952209"><span class="hs-identifier hs-var">doc</span></a></span></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">k -&gt; HsDocString -&gt; Map k HsDocString
forall k a. k -&gt; a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#singleton"><span class="hs-identifier hs-var">M.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680952219"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsDocString -&gt; HsDocString
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621680952209"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-274"></span><span>      </span><span class="annot"><span class="annottext">HsType pass
</span><span class="hs-identifier">_</span></span><span>                                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Map k HsDocString
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span class="hs-comment">-- | The top-level declarations of a module that we care about,</span><span>
</span><span id="line-277"></span><span class="hs-comment">-- ordered by source location, with documentation attached if it exists.</span><span>
</span><span id="line-278"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#topDecls"><span class="hs-identifier hs-type">topDecls</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsGroup"><span class="hs-identifier hs-type">HsGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-279"></span><span id="topDecls"><span class="annot"><span class="annottext">topDecls :: HsGroup (GhcPass 'Renamed)
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
</span><a href="GHC.HsToCore.Docs.html#topDecls"><span class="hs-identifier hs-var hs-var">topDecls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(LHsDecl (GhcPass 'Renamed), [HsDocString])]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall a doc. [(LHsDecl a, doc)] -&gt; [(LHsDecl a, doc)]
</span><a href="GHC.HsToCore.Docs.html#filterClasses"><span class="hs-identifier hs-var">filterClasses</span></a></span><span> </span><span class="annot"><span class="annottext">([(LHsDecl (GhcPass 'Renamed), [HsDocString])]
 -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; (HsGroup (GhcPass 'Renamed)
    -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[(LHsDecl (GhcPass 'Renamed), [HsDocString])]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall a doc. [(LHsDecl a, doc)] -&gt; [(LHsDecl a, doc)]
</span><a href="GHC.HsToCore.Docs.html#filterDecls"><span class="hs-identifier hs-var">filterDecls</span></a></span><span> </span><span class="annot"><span class="annottext">([(LHsDecl (GhcPass 'Renamed), [HsDocString])]
 -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; (HsGroup (GhcPass 'Renamed)
    -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall pass. [LHsDecl pass] -&gt; [(LHsDecl pass, [HsDocString])]
</span><a href="GHC.HsToCore.Docs.html#collectDocs"><span class="hs-identifier hs-var">collectDocs</span></a></span><span> </span><span class="annot"><span class="annottext">([LHsDecl (GhcPass 'Renamed)]
 -&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])])
-&gt; (HsGroup (GhcPass 'Renamed) -&gt; [LHsDecl (GhcPass 'Renamed)])
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [(LHsDecl (GhcPass 'Renamed), [HsDocString])]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [Located a] -&gt; [Located a]
</span><a href="GHC.Types.SrcLoc.html#sortLocated"><span class="hs-identifier hs-var">sortLocated</span></a></span><span> </span><span class="annot"><span class="annottext">([LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)])
-&gt; (HsGroup (GhcPass 'Renamed) -&gt; [LHsDecl (GhcPass 'Renamed)])
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed) -&gt; [LHsDecl (GhcPass 'Renamed)]
</span><a href="GHC.HsToCore.Docs.html#ungroup"><span class="hs-identifier hs-var">ungroup</span></a></span><span>
</span><span id="line-280"></span><span>
</span><span id="line-281"></span><span class="hs-comment">-- | Take all declarations except pragmas, infix decls, rules from an 'HsGroup'.</span><span>
</span><span id="line-282"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#ungroup"><span class="hs-identifier hs-type">ungroup</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsGroup"><span class="hs-identifier hs-type">HsGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-283"></span><span id="ungroup"><span class="annot"><span class="annottext">ungroup :: HsGroup (GhcPass 'Renamed) -&gt; [LHsDecl (GhcPass 'Renamed)]
</span><a href="GHC.HsToCore.Docs.html#ungroup"><span class="hs-identifier hs-var hs-var">ungroup</span></a></span></span><span> </span><span id="local-6989586621680952205"><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
</span><a href="#local-6989586621680952205"><span class="hs-identifier hs-var">group_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-284"></span><span>  </span><span class="annot"><span class="annottext">(HsGroup (GhcPass 'Renamed)
 -&gt; [Located (TyClDecl (GhcPass 'Renamed))])
-&gt; (TyClDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyClGroup (GhcPass 'Renamed)]
-&gt; [Located (TyClDecl (GhcPass 'Renamed))]
forall pass. [TyClGroup pass] -&gt; [LTyClDecl pass]
</span><a href="GHC.Hs.Decls.html#tyClGroupTyClDecls"><span class="hs-identifier hs-var">tyClGroupTyClDecls</span></a></span><span> </span><span class="annot"><span class="annottext">([TyClGroup (GhcPass 'Renamed)]
 -&gt; [Located (TyClDecl (GhcPass 'Renamed))])
-&gt; (HsGroup (GhcPass 'Renamed) -&gt; [TyClGroup (GhcPass 'Renamed)])
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [Located (TyClDecl (GhcPass 'Renamed))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed) -&gt; [TyClGroup (GhcPass 'Renamed)]
forall p. HsGroup p -&gt; [TyClGroup p]
</span><a href="GHC.Hs.Decls.html#hs_tyclds"><span class="hs-identifier hs-var hs-var">hs_tyclds</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XTyClD (GhcPass 'Renamed)
-&gt; TyClDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed)
forall p. XTyClD p -&gt; TyClDecl p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#TyClD"><span class="hs-identifier hs-var">TyClD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XTyClD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
</span><a href="#local-6989586621680952205"><span class="hs-identifier hs-var">group_</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-285"></span><span>  </span><span class="annot"><span class="annottext">(HsGroup (GhcPass 'Renamed)
 -&gt; [Located (DerivDecl (GhcPass 'Renamed))])
-&gt; (DerivDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
-&gt; [Located (DerivDecl (GhcPass 'Renamed))]
forall p. HsGroup p -&gt; [LDerivDecl p]
</span><a href="GHC.Hs.Decls.html#hs_derivds"><span class="hs-identifier hs-var hs-var">hs_derivds</span></a></span><span>             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XDerivD (GhcPass 'Renamed)
-&gt; DerivDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed)
forall p. XDerivD p -&gt; DerivDecl p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#DerivD"><span class="hs-identifier hs-var">DerivD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XDerivD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
</span><a href="#local-6989586621680952205"><span class="hs-identifier hs-var">group_</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-286"></span><span>  </span><span class="annot"><span class="annottext">(HsGroup (GhcPass 'Renamed)
 -&gt; [Located (DefaultDecl (GhcPass 'Renamed))])
-&gt; (DefaultDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
-&gt; [Located (DefaultDecl (GhcPass 'Renamed))]
forall p. HsGroup p -&gt; [LDefaultDecl p]
</span><a href="GHC.Hs.Decls.html#hs_defds"><span class="hs-identifier hs-var hs-var">hs_defds</span></a></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XDefD (GhcPass 'Renamed)
-&gt; DefaultDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed)
forall p. XDefD p -&gt; DefaultDecl p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#DefD"><span class="hs-identifier hs-var">DefD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XDefD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
</span><a href="#local-6989586621680952205"><span class="hs-identifier hs-var">group_</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-287"></span><span>  </span><span class="annot"><span class="annottext">(HsGroup (GhcPass 'Renamed)
 -&gt; [Located (ForeignDecl (GhcPass 'Renamed))])
-&gt; (ForeignDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
-&gt; [Located (ForeignDecl (GhcPass 'Renamed))]
forall p. HsGroup p -&gt; [LForeignDecl p]
</span><a href="GHC.Hs.Decls.html#hs_fords"><span class="hs-identifier hs-var hs-var">hs_fords</span></a></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XForD (GhcPass 'Renamed)
-&gt; ForeignDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed)
forall p. XForD p -&gt; ForeignDecl p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#ForD"><span class="hs-identifier hs-var">ForD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XForD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
</span><a href="#local-6989586621680952205"><span class="hs-identifier hs-var">group_</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-288"></span><span>  </span><span class="annot"><span class="annottext">(HsGroup (GhcPass 'Renamed) -&gt; [Located DocDecl])
-&gt; (DocDecl -&gt; HsDecl (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed) -&gt; [Located DocDecl]
forall p. HsGroup p -&gt; [Located DocDecl]
</span><a href="GHC.Hs.Decls.html#hs_docs"><span class="hs-identifier hs-var hs-var">hs_docs</span></a></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XDocD (GhcPass 'Renamed) -&gt; DocDecl -&gt; HsDecl (GhcPass 'Renamed)
forall p. XDocD p -&gt; DocDecl -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#DocD"><span class="hs-identifier hs-var">DocD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XDocD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
</span><a href="#local-6989586621680952205"><span class="hs-identifier hs-var">group_</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-289"></span><span>  </span><span class="annot"><span class="annottext">(HsGroup (GhcPass 'Renamed)
 -&gt; [Located (InstDecl (GhcPass 'Renamed))])
-&gt; (InstDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyClGroup (GhcPass 'Renamed)]
-&gt; [Located (InstDecl (GhcPass 'Renamed))]
forall pass. [TyClGroup pass] -&gt; [LInstDecl pass]
</span><a href="GHC.Hs.Decls.html#tyClGroupInstDecls"><span class="hs-identifier hs-var">tyClGroupInstDecls</span></a></span><span> </span><span class="annot"><span class="annottext">([TyClGroup (GhcPass 'Renamed)]
 -&gt; [Located (InstDecl (GhcPass 'Renamed))])
-&gt; (HsGroup (GhcPass 'Renamed) -&gt; [TyClGroup (GhcPass 'Renamed)])
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [Located (InstDecl (GhcPass 'Renamed))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed) -&gt; [TyClGroup (GhcPass 'Renamed)]
forall p. HsGroup p -&gt; [TyClGroup p]
</span><a href="GHC.Hs.Decls.html#hs_tyclds"><span class="hs-identifier hs-var hs-var">hs_tyclds</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XInstD (GhcPass 'Renamed)
-&gt; InstDecl (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed)
forall p. XInstD p -&gt; InstDecl p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#InstD"><span class="hs-identifier hs-var">InstD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XInstD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
</span><a href="#local-6989586621680952205"><span class="hs-identifier hs-var">group_</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-290"></span><span>  </span><span class="annot"><span class="annottext">(HsGroup (GhcPass 'Renamed) -&gt; [Located (Sig (GhcPass 'Renamed))])
-&gt; (Sig (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsValBinds (GhcPass 'Renamed) -&gt; [Located (Sig (GhcPass 'Renamed))]
</span><a href="#local-6989586621680952196"><span class="hs-identifier hs-var">typesigs</span></a></span><span> </span><span class="annot"><span class="annottext">(HsValBinds (GhcPass 'Renamed)
 -&gt; [Located (Sig (GhcPass 'Renamed))])
-&gt; (HsGroup (GhcPass 'Renamed) -&gt; HsValBinds (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [Located (Sig (GhcPass 'Renamed))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed) -&gt; HsValBinds (GhcPass 'Renamed)
forall p. HsGroup p -&gt; HsValBinds p
</span><a href="GHC.Hs.Decls.html#hs_valds"><span class="hs-identifier hs-var hs-var">hs_valds</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XSigD (GhcPass 'Renamed)
-&gt; Sig (GhcPass 'Renamed) -&gt; HsDecl (GhcPass 'Renamed)
forall p. XSigD p -&gt; Sig p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#SigD"><span class="hs-identifier hs-var">SigD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XSigD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
</span><a href="#local-6989586621680952205"><span class="hs-identifier hs-var">group_</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsDecl (GhcPass 'Renamed)]
-&gt; [LHsDecl (GhcPass 'Renamed)] -&gt; [LHsDecl (GhcPass 'Renamed)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-291"></span><span>  </span><span class="annot"><span class="annottext">(HsGroup (GhcPass 'Renamed)
 -&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))])
-&gt; (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)
    -&gt; HsDecl (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [LHsDecl (GhcPass 'Renamed)]
forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var">mkDecls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsValBinds (GhcPass 'Renamed)
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
</span><a href="#local-6989586621680952194"><span class="hs-identifier hs-var">valbinds</span></a></span><span> </span><span class="annot"><span class="annottext">(HsValBinds (GhcPass 'Renamed)
 -&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))])
-&gt; (HsGroup (GhcPass 'Renamed) -&gt; HsValBinds (GhcPass 'Renamed))
-&gt; HsGroup (GhcPass 'Renamed)
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed) -&gt; HsValBinds (GhcPass 'Renamed)
forall p. HsGroup p -&gt; HsValBinds p
</span><a href="GHC.Hs.Decls.html#hs_valds"><span class="hs-identifier hs-var hs-var">hs_valds</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XValD (GhcPass 'Renamed)
-&gt; HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)
-&gt; HsDecl (GhcPass 'Renamed)
forall p. XValD p -&gt; HsBind p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#ValD"><span class="hs-identifier hs-var">ValD</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XValD (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">HsGroup (GhcPass 'Renamed)
</span><a href="#local-6989586621680952205"><span class="hs-identifier hs-var">group_</span></a></span><span>
</span><span id="line-292"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-293"></span><span>    </span><span class="annot"><a href="#local-6989586621680952196"><span class="hs-identifier hs-type">typesigs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#HsValBinds"><span class="hs-identifier hs-type">HsValBinds</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Binds.html#LSig"><span class="hs-identifier hs-type">LSig</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-294"></span><span>    </span><span id="local-6989586621680952196"><span class="annot"><span class="annottext">typesigs :: HsValBinds (GhcPass 'Renamed) -&gt; [Located (Sig (GhcPass 'Renamed))]
</span><a href="#local-6989586621680952196"><span class="hs-identifier hs-var hs-var">typesigs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#XValBindsLR"><span class="hs-identifier hs-type">XValBindsLR</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#NValBinds"><span class="hs-identifier hs-type">NValBinds</span></a></span><span> </span><span class="annot"><span class="annottext">[(RecFlag,
  Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952191"><span class="annot"><span class="annottext">[Located (Sig (GhcPass 'Renamed))]
</span><a href="#local-6989586621680952191"><span class="hs-identifier hs-var">sig</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located (Sig (GhcPass 'Renamed)) -&gt; Bool)
-&gt; [Located (Sig (GhcPass 'Renamed))]
-&gt; [Located (Sig (GhcPass 'Renamed))]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Sig (GhcPass 'Renamed) -&gt; Bool
forall name. Sig name -&gt; Bool
</span><a href="GHC.HsToCore.Docs.html#isUserSig"><span class="hs-identifier hs-var">isUserSig</span></a></span><span> </span><span class="annot"><span class="annottext">(Sig (GhcPass 'Renamed) -&gt; Bool)
-&gt; (Located (Sig (GhcPass 'Renamed)) -&gt; Sig (GhcPass 'Renamed))
-&gt; Located (Sig (GhcPass 'Renamed))
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Sig (GhcPass 'Renamed)) -&gt; Sig (GhcPass 'Renamed)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Located (Sig (GhcPass 'Renamed))]
</span><a href="#local-6989586621680952191"><span class="hs-identifier hs-var">sig</span></a></span><span>
</span><span id="line-295"></span><span>    </span><span class="annot"><a href="#local-6989586621680952196"><span class="hs-identifier hs-var">typesigs</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#ValBinds"><span class="hs-identifier hs-type">ValBinds</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Located (Sig (GhcPass 'Renamed))]
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;expected XValBindsLR&quot;</span></span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span>    </span><span class="annot"><a href="#local-6989586621680952194"><span class="hs-identifier hs-type">valbinds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#HsValBinds"><span class="hs-identifier hs-type">HsValBinds</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Binds.html#LHsBind"><span class="hs-identifier hs-type">LHsBind</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-298"></span><span>    </span><span id="local-6989586621680952194"><span class="annot"><span class="annottext">valbinds :: HsValBinds (GhcPass 'Renamed)
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
</span><a href="#local-6989586621680952194"><span class="hs-identifier hs-var hs-var">valbinds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#XValBindsLR"><span class="hs-identifier hs-type">XValBindsLR</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#NValBinds"><span class="hs-identifier hs-type">NValBinds</span></a></span><span> </span><span id="local-6989586621680952186"><span class="annot"><span class="annottext">[(RecFlag,
  Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
</span><a href="#local-6989586621680952186"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span class="annot"><span class="annottext">[Located (Sig (GhcPass 'Renamed))]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-299"></span><span>      </span><span class="annot"><span class="annottext">(Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))
 -&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))])
-&gt; [Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))]
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
forall a. Bag a -&gt; [a]
</span><a href="GHC.Data.Bag.html#bagToList"><span class="hs-identifier hs-var">bagToList</span></a></span><span> </span><span class="annot"><span class="annottext">([Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))]
 -&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))])
-&gt; ([(RecFlag,
      Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
    -&gt; [Bag
          (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))])
-&gt; [(RecFlag,
     Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">([RecFlag],
 [Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))])
-&gt; [Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))]
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">(([RecFlag],
  [Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))])
 -&gt; [Bag
       (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))])
-&gt; ([(RecFlag,
      Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
    -&gt; ([RecFlag],
        [Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))]))
-&gt; [(RecFlag,
     Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
-&gt; [Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[(RecFlag,
  Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
-&gt; ([RecFlag],
    [Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed)))])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="annot"><span class="annottext">([(RecFlag,
   Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
 -&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))])
-&gt; [(RecFlag,
     Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[(RecFlag,
  Bag (Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))))]
</span><a href="#local-6989586621680952186"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-300"></span><span>    </span><span class="annot"><a href="#local-6989586621680952194"><span class="hs-identifier hs-var">valbinds</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#ValBinds"><span class="hs-identifier hs-type">ValBinds</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
-&gt; [Located (HsBindLR (GhcPass 'Renamed) (GhcPass 'Renamed))]
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;expected XValBindsLR&quot;</span></span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="hs-comment">-- | Collect docs and attach them to the right declarations.</span><span>
</span><span id="line-303"></span><span class="hs-comment">--</span><span>
</span><span id="line-304"></span><span class="hs-comment">-- A declaration may have multiple doc strings attached to it.</span><span>
</span><span id="line-305"></span><span id="local-6989586621680952627"><span class="annot"><a href="GHC.HsToCore.Docs.html#collectDocs"><span class="hs-identifier hs-type">collectDocs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952627"><span class="hs-identifier hs-type">pass</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952627"><span class="hs-identifier hs-type">pass</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span></span><span>
</span><span id="line-306"></span><span class="hs-comment">-- ^ This is an example.</span><span>
</span><span id="line-307"></span><span id="collectDocs"><span class="annot"><span class="annottext">collectDocs :: forall pass. [LHsDecl pass] -&gt; [(LHsDecl pass, [HsDocString])]
</span><a href="GHC.HsToCore.Docs.html#collectDocs"><span class="hs-identifier hs-var hs-var">collectDocs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HsDocString]
-&gt; Maybe (GenLocated SrcSpan (HsDecl pass))
-&gt; [GenLocated SrcSpan (HsDecl pass)]
-&gt; [(GenLocated SrcSpan (HsDecl pass), [HsDocString])]
forall {l} {p}.
[HsDocString]
-&gt; Maybe (GenLocated l (HsDecl p))
-&gt; [GenLocated l (HsDecl p)]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
</span><a href="#local-6989586621680952185"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">Maybe (GenLocated SrcSpan (HsDecl pass))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-308"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-309"></span><span>    </span><span id="local-6989586621680952185"><span class="annot"><span class="annottext">go :: [HsDocString]
-&gt; Maybe (GenLocated l (HsDecl p))
-&gt; [GenLocated l (HsDecl p)]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
</span><a href="#local-6989586621680952185"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680952184"><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952184"><span class="hs-identifier hs-var">docs</span></a></span></span><span> </span><span id="local-6989586621680952183"><span class="annot"><span class="annottext">Maybe (GenLocated l (HsDecl p))
</span><a href="#local-6989586621680952183"><span class="hs-identifier hs-var">mprev</span></a></span></span><span> </span><span id="local-6989586621680952182"><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952182"><span class="hs-identifier hs-var">decls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952182"><span class="hs-identifier hs-var">decls</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (GenLocated l (HsDecl p))
</span><a href="#local-6989586621680952183"><span class="hs-identifier hs-var">mprev</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-310"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated l (HsDecl p) -&gt; HsDecl p
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="GHC.Hs.Decls.html#DocD"><span class="hs-identifier hs-type">DocD</span></a></span><span> </span><span class="annot"><span class="annottext">XDocD p
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#DocCommentNext"><span class="hs-identifier hs-type">DocCommentNext</span></a></span><span> </span><span id="local-6989586621680952180"><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680952180"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680952179"><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952179"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (GenLocated l (HsDecl p))
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[HsDocString]
-&gt; Maybe (GenLocated l (HsDecl p))
-&gt; [GenLocated l (HsDecl p)]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
</span><a href="#local-6989586621680952185"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680952180"><span class="hs-identifier hs-var">s</span></a></span><span class="annot"><span class="annottext">HsDocString -&gt; [HsDocString] -&gt; [HsDocString]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952184"><span class="hs-identifier hs-var">docs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe (GenLocated l (HsDecl p))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952179"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-311"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated l (HsDecl p) -&gt; HsDecl p
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="GHC.Hs.Decls.html#DocD"><span class="hs-identifier hs-type">DocD</span></a></span><span> </span><span class="annot"><span class="annottext">XDocD p
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#DocCommentNext"><span class="hs-identifier hs-type">DocCommentNext</span></a></span><span> </span><span id="local-6989586621680952178"><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680952178"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680952177"><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952177"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680952176"><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952176"><span class="hs-identifier hs-var">prev</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
-&gt; [HsDocString]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
forall {a} {a}. a -&gt; [a] -&gt; [(a, [a])] -&gt; [(a, [a])]
</span><a href="#local-6989586621680952175"><span class="hs-identifier hs-var">finished</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952176"><span class="hs-identifier hs-var">prev</span></a></span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952184"><span class="hs-identifier hs-var">docs</span></a></span><span> </span><span class="annot"><span class="annottext">([(GenLocated l (HsDecl p), [HsDocString])]
 -&gt; [(GenLocated l (HsDecl p), [HsDocString])])
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[HsDocString]
-&gt; Maybe (GenLocated l (HsDecl p))
-&gt; [GenLocated l (HsDecl p)]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
</span><a href="#local-6989586621680952185"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680952178"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">Maybe (GenLocated l (HsDecl p))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952177"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-312"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated l (HsDecl p) -&gt; HsDecl p
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="GHC.Hs.Decls.html#DocD"><span class="hs-identifier hs-type">DocD</span></a></span><span> </span><span class="annot"><span class="annottext">XDocD p
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#DocCommentPrev"><span class="hs-identifier hs-type">DocCommentPrev</span></a></span><span> </span><span id="local-6989586621680952173"><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680952173"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680952172"><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952172"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680952171"><span class="annot"><span class="annottext">Maybe (GenLocated l (HsDecl p))
</span><a href="#local-6989586621680952171"><span class="hs-identifier hs-var">mprev</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[HsDocString]
-&gt; Maybe (GenLocated l (HsDecl p))
-&gt; [GenLocated l (HsDecl p)]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
</span><a href="#local-6989586621680952185"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocString
</span><a href="#local-6989586621680952173"><span class="hs-identifier hs-var">s</span></a></span><span class="annot"><span class="annottext">HsDocString -&gt; [HsDocString] -&gt; [HsDocString]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952184"><span class="hs-identifier hs-var">docs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe (GenLocated l (HsDecl p))
</span><a href="#local-6989586621680952171"><span class="hs-identifier hs-var">mprev</span></a></span><span> </span><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952172"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-313"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680952170"><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952170"><span class="hs-identifier hs-var">d</span></a></span></span><span>                                  </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680952169"><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952169"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (GenLocated l (HsDecl p))
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[HsDocString]
-&gt; Maybe (GenLocated l (HsDecl p))
-&gt; [GenLocated l (HsDecl p)]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
</span><a href="#local-6989586621680952185"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952184"><span class="hs-identifier hs-var">docs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated l (HsDecl p) -&gt; Maybe (GenLocated l (HsDecl p))
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952170"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952169"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-314"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680952168"><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952168"><span class="hs-identifier hs-var">d</span></a></span></span><span>                                  </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680952167"><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952167"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680952166"><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952166"><span class="hs-identifier hs-var">prev</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
-&gt; [HsDocString]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
forall {a} {a}. a -&gt; [a] -&gt; [(a, [a])] -&gt; [(a, [a])]
</span><a href="#local-6989586621680952175"><span class="hs-identifier hs-var">finished</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952166"><span class="hs-identifier hs-var">prev</span></a></span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952184"><span class="hs-identifier hs-var">docs</span></a></span><span> </span><span class="annot"><span class="annottext">([(GenLocated l (HsDecl p), [HsDocString])]
 -&gt; [(GenLocated l (HsDecl p), [HsDocString])])
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[HsDocString]
-&gt; Maybe (GenLocated l (HsDecl p))
-&gt; [GenLocated l (HsDecl p)]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
</span><a href="#local-6989586621680952185"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated l (HsDecl p) -&gt; Maybe (GenLocated l (HsDecl p))
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952168"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[GenLocated l (HsDecl p)]
</span><a href="#local-6989586621680952167"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-315"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span>                                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (GenLocated l (HsDecl p))
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-316"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span>                                     </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680952165"><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952165"><span class="hs-identifier hs-var">prev</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
-&gt; [HsDocString]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
-&gt; [(GenLocated l (HsDecl p), [HsDocString])]
forall {a} {a}. a -&gt; [a] -&gt; [(a, [a])] -&gt; [(a, [a])]
</span><a href="#local-6989586621680952175"><span class="hs-identifier hs-var">finished</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated l (HsDecl p)
</span><a href="#local-6989586621680952165"><span class="hs-identifier hs-var">prev</span></a></span><span> </span><span class="annot"><span class="annottext">[HsDocString]
</span><a href="#local-6989586621680952184"><span class="hs-identifier hs-var">docs</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-317"></span><span>
</span><span id="line-318"></span><span>    </span><span id="local-6989586621680952175"><span class="annot"><span class="annottext">finished :: a -&gt; [a] -&gt; [(a, [a])] -&gt; [(a, [a])]
</span><a href="#local-6989586621680952175"><span class="hs-identifier hs-var hs-var">finished</span></a></span></span><span> </span><span id="local-6989586621680952164"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680952164"><span class="hs-identifier hs-var">decl</span></a></span></span><span> </span><span id="local-6989586621680952163"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680952163"><span class="hs-identifier hs-var">docs</span></a></span></span><span> </span><span id="local-6989586621680952162"><span class="annot"><span class="annottext">[(a, [a])]
</span><a href="#local-6989586621680952162"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680952164"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680952163"><span class="hs-identifier hs-var">docs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(a, [a]) -&gt; [(a, [a])] -&gt; [(a, [a])]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(a, [a])]
</span><a href="#local-6989586621680952162"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-319"></span><span>
</span><span id="line-320"></span><span class="hs-comment">-- | Filter out declarations that we don't handle in Haddock</span><span>
</span><span id="line-321"></span><span id="local-6989586621680952628"><span id="local-6989586621680952629"><span class="annot"><a href="GHC.HsToCore.Docs.html#filterDecls"><span class="hs-identifier hs-type">filterDecls</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952629"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680952628"><span class="hs-identifier hs-type">doc</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952629"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680952628"><span class="hs-identifier hs-type">doc</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span></span></span><span>
</span><span id="line-322"></span><span id="filterDecls"><span class="annot"><span class="annottext">filterDecls :: forall a doc. [(LHsDecl a, doc)] -&gt; [(LHsDecl a, doc)]
</span><a href="GHC.HsToCore.Docs.html#filterDecls"><span class="hs-identifier hs-var hs-var">filterDecls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((GenLocated SrcSpan (HsDecl a), doc) -&gt; Bool)
-&gt; [(GenLocated SrcSpan (HsDecl a), doc)]
-&gt; [(GenLocated SrcSpan (HsDecl a), doc)]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDecl a -&gt; Bool
forall a. HsDecl a -&gt; Bool
</span><a href="#local-6989586621680952160"><span class="hs-identifier hs-var">isHandled</span></a></span><span> </span><span class="annot"><span class="annottext">(HsDecl a -&gt; Bool)
-&gt; ((GenLocated SrcSpan (HsDecl a), doc) -&gt; HsDecl a)
-&gt; (GenLocated SrcSpan (HsDecl a), doc)
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsDecl a) -&gt; HsDecl a
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (HsDecl a) -&gt; HsDecl a)
-&gt; ((GenLocated SrcSpan (HsDecl a), doc)
    -&gt; GenLocated SrcSpan (HsDecl a))
-&gt; (GenLocated SrcSpan (HsDecl a), doc)
-&gt; HsDecl a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (HsDecl a), doc)
-&gt; GenLocated SrcSpan (HsDecl a)
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-323"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-324"></span><span>    </span><span id="local-6989586621680952160"><span class="annot"><span class="annottext">isHandled :: HsDecl name -&gt; Bool
</span><a href="#local-6989586621680952160"><span class="hs-identifier hs-var hs-var">isHandled</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ForD"><span class="hs-identifier hs-type">ForD</span></a></span><span> </span><span class="annot"><span class="annottext">XForD name
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ForeignImport"><span class="hs-identifier hs-type">ForeignImport</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-325"></span><span>    </span><span class="annot"><a href="#local-6989586621680952160"><span class="hs-identifier hs-var">isHandled</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#TyClD"><span class="hs-identifier hs-type">TyClD</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-326"></span><span>    </span><span class="annot"><a href="#local-6989586621680952160"><span class="hs-identifier hs-var">isHandled</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#InstD"><span class="hs-identifier hs-type">InstD</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-327"></span><span>    </span><span class="annot"><a href="#local-6989586621680952160"><span class="hs-identifier hs-var">isHandled</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#DerivD"><span class="hs-identifier hs-type">DerivD</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-328"></span><span>    </span><span class="annot"><a href="#local-6989586621680952160"><span class="hs-identifier hs-var">isHandled</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#SigD"><span class="hs-identifier hs-type">SigD</span></a></span><span> </span><span class="annot"><span class="annottext">XSigD name
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680952159"><span class="annot"><span class="annottext">Sig name
</span><a href="#local-6989586621680952159"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Sig name -&gt; Bool
forall name. Sig name -&gt; Bool
</span><a href="GHC.HsToCore.Docs.html#isUserSig"><span class="hs-identifier hs-var">isUserSig</span></a></span><span> </span><span class="annot"><span class="annottext">Sig name
</span><a href="#local-6989586621680952159"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-329"></span><span>    </span><span class="annot"><a href="#local-6989586621680952160"><span class="hs-identifier hs-var">isHandled</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ValD"><span class="hs-identifier hs-type">ValD</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-330"></span><span>    </span><span class="hs-comment">-- we keep doc declarations to be able to get at named docs</span><span>
</span><span id="line-331"></span><span>    </span><span class="annot"><a href="#local-6989586621680952160"><span class="hs-identifier hs-var">isHandled</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#DocD"><span class="hs-identifier hs-type">DocD</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-332"></span><span>    </span><span class="annot"><a href="#local-6989586621680952160"><span class="hs-identifier hs-var">isHandled</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl name
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-333"></span><span>
</span><span id="line-334"></span><span>
</span><span id="line-335"></span><span class="hs-comment">-- | Go through all class declarations and filter their sub-declarations</span><span>
</span><span id="line-336"></span><span id="local-6989586621680952157"><span id="local-6989586621680952158"><span class="annot"><a href="GHC.HsToCore.Docs.html#filterClasses"><span class="hs-identifier hs-type">filterClasses</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952158"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680952157"><span class="hs-identifier hs-type">doc</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#LHsDecl"><span class="hs-identifier hs-type">LHsDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952158"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680952157"><span class="hs-identifier hs-type">doc</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span></span></span><span>
</span><span id="line-337"></span><span id="filterClasses"><span class="annot"><span class="annottext">filterClasses :: forall a doc. [(LHsDecl a, doc)] -&gt; [(LHsDecl a, doc)]
</span><a href="GHC.HsToCore.Docs.html#filterClasses"><span class="hs-identifier hs-var hs-var">filterClasses</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((GenLocated SrcSpan (HsDecl a), doc)
 -&gt; (GenLocated SrcSpan (HsDecl a), doc))
-&gt; [(GenLocated SrcSpan (HsDecl a), doc)]
-&gt; [(GenLocated SrcSpan (HsDecl a), doc)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(GenLocated SrcSpan (HsDecl a) -&gt; GenLocated SrcSpan (HsDecl a))
-&gt; (GenLocated SrcSpan (HsDecl a), doc)
-&gt; (GenLocated SrcSpan (HsDecl a), doc)
forall (p :: * -&gt; * -&gt; *) a b c.
Bifunctor p =&gt;
(a -&gt; b) -&gt; p a c -&gt; p b c
</span><a href="../../base/src/Data.Bifunctor.html#first"><span class="hs-identifier hs-var">first</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(HsDecl a -&gt; HsDecl a)
-&gt; GenLocated SrcSpan (HsDecl a) -&gt; GenLocated SrcSpan (HsDecl a)
forall a b l. (a -&gt; b) -&gt; GenLocated l a -&gt; GenLocated l b
</span><a href="GHC.Types.SrcLoc.html#mapLoc"><span class="hs-identifier hs-var">mapLoc</span></a></span><span> </span><span class="annot"><span class="annottext">HsDecl a -&gt; HsDecl a
forall {p}. HsDecl p -&gt; HsDecl p
</span><a href="#local-6989586621680952153"><span class="hs-identifier hs-var">filterClass</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-338"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-339"></span><span>    </span><span id="local-6989586621680952153"><span class="annot"><span class="annottext">filterClass :: HsDecl p -&gt; HsDecl p
</span><a href="#local-6989586621680952153"><span class="hs-identifier hs-var hs-var">filterClass</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#TyClD"><span class="hs-identifier hs-type">TyClD</span></a></span><span> </span><span id="local-6989586621680952150"><span class="annot"><span class="annottext">XTyClD p
</span><a href="#local-6989586621680952150"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621680952149"><span class="annot"><span class="annottext">c :: TyClDecl p
</span><a href="#local-6989586621680952149"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#ClassDecl"><span class="hs-identifier hs-type">ClassDecl</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-340"></span><span>      </span><span class="annot"><span class="annottext">XTyClD p -&gt; TyClDecl p -&gt; HsDecl p
forall p. XTyClD p -&gt; TyClDecl p -&gt; HsDecl p
</span><a href="GHC.Hs.Decls.html#TyClD"><span class="hs-identifier hs-var">TyClD</span></a></span><span> </span><span class="annot"><span class="annottext">XTyClD p
</span><a href="#local-6989586621680952150"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">(TyClDecl p -&gt; HsDecl p) -&gt; TyClDecl p -&gt; HsDecl p
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl p
</span><a href="#local-6989586621680952149"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">tcdSigs :: [GenLocated SrcSpan (Sig p)]
</span><a href="GHC.Hs.Decls.html#tcdSigs"><span class="hs-identifier hs-var">tcdSigs</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-341"></span><span>        </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (Sig p) -&gt; Bool)
-&gt; [GenLocated SrcSpan (Sig p)] -&gt; [GenLocated SrcSpan (Sig p)]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Bool -&gt; Bool -&gt; Bool)
-&gt; (GenLocated SrcSpan (Sig p) -&gt; Bool)
-&gt; (GenLocated SrcSpan (Sig p) -&gt; Bool)
-&gt; GenLocated SrcSpan (Sig p)
-&gt; Bool
forall (f :: * -&gt; *) a b c.
Applicative f =&gt;
(a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c
</span><a href="../../base/src/GHC.Base.html#liftA2"><span class="hs-identifier hs-var">liftA2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">(||)</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Sig p -&gt; Bool
forall name. Sig name -&gt; Bool
</span><a href="GHC.HsToCore.Docs.html#isUserSig"><span class="hs-identifier hs-var">isUserSig</span></a></span><span> </span><span class="annot"><span class="annottext">(Sig p -&gt; Bool)
-&gt; (GenLocated SrcSpan (Sig p) -&gt; Sig p)
-&gt; GenLocated SrcSpan (Sig p)
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Sig p) -&gt; Sig p
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Sig p) -&gt; Bool
forall name. LSig name -&gt; Bool
</span><a href="GHC.Hs.Binds.html#isMinimalLSig"><span class="hs-identifier hs-var">isMinimalLSig</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyClDecl p -&gt; [GenLocated SrcSpan (Sig p)]
forall pass. TyClDecl pass -&gt; [LSig pass]
</span><a href="GHC.Hs.Decls.html#tcdSigs"><span class="hs-identifier hs-var hs-var">tcdSigs</span></a></span><span> </span><span class="annot"><span class="annottext">TyClDecl p
</span><a href="#local-6989586621680952149"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-342"></span><span>    </span><span class="annot"><a href="#local-6989586621680952153"><span class="hs-identifier hs-var">filterClass</span></a></span><span> </span><span id="local-6989586621680952144"><span class="annot"><span class="annottext">HsDecl p
</span><a href="#local-6989586621680952144"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsDecl p
</span><a href="#local-6989586621680952144"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span class="hs-comment">-- | Was this signature given by the user?</span><span>
</span><span id="line-345"></span><span id="local-6989586621680952571"><span class="annot"><a href="GHC.HsToCore.Docs.html#isUserSig"><span class="hs-identifier hs-type">isUserSig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#Sig"><span class="hs-identifier hs-type">Sig</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952571"><span class="hs-identifier hs-type">name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-346"></span><span id="isUserSig"><span class="annot"><span class="annottext">isUserSig :: forall name. Sig name -&gt; Bool
</span><a href="GHC.HsToCore.Docs.html#isUserSig"><span class="hs-identifier hs-var hs-var">isUserSig</span></a></span></span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#TypeSig"><span class="hs-identifier hs-type">TypeSig</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-347"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#isUserSig"><span class="hs-identifier hs-var">isUserSig</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#ClassOpSig"><span class="hs-identifier hs-type">ClassOpSig</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-348"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#isUserSig"><span class="hs-identifier hs-var">isUserSig</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#PatSynSig"><span class="hs-identifier hs-type">PatSynSig</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-349"></span><span class="annot"><a href="GHC.HsToCore.Docs.html#isUserSig"><span class="hs-identifier hs-var">isUserSig</span></a></span><span> </span><span class="annot"><span class="annottext">Sig name
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span class="hs-comment">-- | Take a field of declarations from a data structure and create HsDecls</span><span>
</span><span id="line-352"></span><span class="hs-comment">-- using the given constructor</span><span>
</span><span id="line-353"></span><span id="local-6989586621680952622"><span id="local-6989586621680952623"><span id="local-6989586621680952624"><span class="annot"><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-type">mkDecls</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680952624"><span class="hs-identifier hs-type">struct</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952623"><span class="hs-identifier hs-type">decl</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-354"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680952623"><span class="hs-identifier hs-type">decl</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680952622"><span class="hs-identifier hs-type">hsDecl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-355"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680952624"><span class="hs-identifier hs-type">struct</span></a></span><span>
</span><span id="line-356"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680952622"><span class="hs-identifier hs-type">hsDecl</span></a></span><span class="hs-special">]</span></span></span></span><span>
</span><span id="line-357"></span><span id="mkDecls"><span class="annot"><span class="annottext">mkDecls :: forall struct decl hsDecl.
(struct -&gt; [Located decl])
-&gt; (decl -&gt; hsDecl) -&gt; struct -&gt; [Located hsDecl]
</span><a href="GHC.HsToCore.Docs.html#mkDecls"><span class="hs-identifier hs-var hs-var">mkDecls</span></a></span></span><span> </span><span id="local-6989586621680952143"><span class="annot"><span class="annottext">struct -&gt; [Located decl]
</span><a href="#local-6989586621680952143"><span class="hs-identifier hs-var">field</span></a></span></span><span> </span><span id="local-6989586621680952142"><span class="annot"><span class="annottext">decl -&gt; hsDecl
</span><a href="#local-6989586621680952142"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located decl -&gt; GenLocated SrcSpan hsDecl)
-&gt; [Located decl] -&gt; [GenLocated SrcSpan hsDecl]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(decl -&gt; hsDecl) -&gt; Located decl -&gt; GenLocated SrcSpan hsDecl
forall a b l. (a -&gt; b) -&gt; GenLocated l a -&gt; GenLocated l b
</span><a href="GHC.Types.SrcLoc.html#mapLoc"><span class="hs-identifier hs-var">mapLoc</span></a></span><span> </span><span class="annot"><span class="annottext">decl -&gt; hsDecl
</span><a href="#local-6989586621680952142"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([Located decl] -&gt; [GenLocated SrcSpan hsDecl])
-&gt; (struct -&gt; [Located decl])
-&gt; struct
-&gt; [GenLocated SrcSpan hsDecl]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">struct -&gt; [Located decl]
</span><a href="#local-6989586621680952143"><span class="hs-identifier hs-var">field</span></a></span><span>
</span><span id="line-358"></span></pre></body></html>